Skip to content

Commit

Permalink
Merge pull request #964 from pascalgouedo/dev_dd_pgo_rtl_headers
Browse files Browse the repository at this point in the history
Restored v1 headers and added same header to new files.
  • Loading branch information
pascalgouedo authored Mar 26, 2024
2 parents 0682d38 + cb465fa commit c807945
Show file tree
Hide file tree
Showing 11 changed files with 186 additions and 129 deletions.
40 changes: 27 additions & 13 deletions bhv/cv32e40p_instr_trace.svh
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
// Copyright (c) 2020 OpenHW Group
// Copyright 2020 Silicon Labs, Inc.
//
// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// This file, and derivatives thereof are licensed under the
// Solderpad License, Version 2.0 (the "License").
//
// https://solderpad.org/licenses/
// Use of this file means you agree to the terms and conditions
// of the license and are in full compliance with the License.
//
// You may obtain a copy of the License at:
//
// https://solderpad.org/licenses/SHL-2.0/
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// and hardware implementations thereof distributed under the License
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0

// Tracer data structures and functions
//
// Contributors: Steve Richmond, Silicon Labs <[email protected]>
// Pascal Gouedo, Dolphin Design <[email protected]>
////////////////////////////////////////////////////////////////////////////////
// Engineer: Steve Richmond - [email protected] //
// //
// Design Name: cv32e40p_tracer data structures //
// Project Name: CV32E40P //
// Language: SystemVerilog //
// //
// Description: Moves the class definition for instr_trace_t out of the //
// tracer module for readability and code partitioning //
// //
// Includes various enhancements to make the instr_trace_t //
// class more comprehensive //
// //
////////////////////////////////////////////////////////////////////////////////

typedef struct {
logic [5:0] addr;
Expand Down
28 changes: 16 additions & 12 deletions bhv/cv32e40p_rvfi.sv
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
// Copyright (c) 2020 OpenHW Group
// Copyright 2024 Dolphin Design
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
//
// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// Licensed under the Solderpad Hardware License v 2.1 (the "License");
// you may not use this file except in compliance with the License, or,
// at your option, the Apache License version 2.0.
// You may obtain a copy of the License at
//
// https://solderpad.org/licenses/
// https://solderpad.org/licenses/SHL-2.1/
//
// Unless required by applicable law or agreed to in writing, software
// Unless required by applicable law or agreed to in writing, any work
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0

// CV32E40P RVFI interface
//
// Contributors: Davide Schiavone, OpenHW Group <[email protected]>
// Halfdan Bechmann, Silicon Labs <[email protected]>
// Yoann Pruvost, Dolphin Design <[email protected]>
////////////////////////////////////////////////////////////////////////////////////
// //
// Contributors: Davide Schiavone, OpenHW Group <[email protected]> //
// Halfdan Bechmann, Silicon Labs <[email protected]> //
// Yoann Pruvost, Dolphin Design <[email protected]> //
// //
// Description: CV32E40P RVFI interface //
// //
////////////////////////////////////////////////////////////////////////////////////

`include "cv32e40p_rvfi_pkg.sv"

Expand Down
26 changes: 15 additions & 11 deletions bhv/cv32e40p_rvfi_trace.sv
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
// Copyright (c) 2020 OpenHW Group
// Copyright 2024 Dolphin Design
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
//
// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// Licensed under the Solderpad Hardware License v 2.1 (the "License");
// you may not use this file except in compliance with the License, or,
// at your option, the Apache License version 2.0.
// You may obtain a copy of the License at
//
// https://solderpad.org/licenses/
// https://solderpad.org/licenses/SHL-2.1/
//
// Unless required by applicable law or agreed to in writing, software
// Unless required by applicable law or agreed to in writing, any work
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0

// CV32E40P RVFI interface
//
// Contributors: Halfdan Bechmann, Silicon Labs <[email protected]>
// Yoann Pruvost, Dolphin Design <[email protected]>
////////////////////////////////////////////////////////////////////////////////////
// //
// Contributors: Halfdan Bechmann, Silicon Labs <[email protected]> //
// Yoann Pruvost, Dolphin Design <[email protected]> //
// //
// Description: CV32E40P RVFI tracer //
// //
////////////////////////////////////////////////////////////////////////////////////

module cv32e40p_rvfi_trace
import cv32e40p_pkg::*;
Expand Down
26 changes: 15 additions & 11 deletions bhv/cv32e40p_tb_wrapper.sv
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
// Copyright (c) 2020 OpenHW Group
// Copyright 2024 Dolphin Design
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
//
// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// Licensed under the Solderpad Hardware License v 2.1 (the "License");
// you may not use this file except in compliance with the License, or,
// at your option, the Apache License version 2.0.
// You may obtain a copy of the License at
//
// https://solderpad.org/licenses/
// https://solderpad.org/licenses/SHL-2.1/
//
// Unless required by applicable law or agreed to in writing, software
// Unless required by applicable law or agreed to in writing, any work
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0

// Wrapper for a cv32e40p, containing cv32e40p_top, and rvfi_tracer
//
// Contributors: Davide Schiavone, OpenHW Group <[email protected]>
// Yoann Pruvost, Dolphin Design <[email protected]>
////////////////////////////////////////////////////////////////////////////////////
// //
// Contributors: Davide Schiavone, OpenHW Group <[email protected]> //
// Yoann Pruvost, Dolphin Design <[email protected]> //
// //
// Description: Test-bench wrapper for cv32e40p_top, tracer and and rvfi_tracer //
// //
////////////////////////////////////////////////////////////////////////////////////

`ifdef CV32E40P_ASSERT_ON
`include "cv32e40p_prefetch_controller_sva.sv"
Expand Down
44 changes: 23 additions & 21 deletions bhv/cv32e40p_tracer.sv
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
// Copyright (c) 2020 OpenHW Group
//
// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://solderpad.org/licenses/
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0

// Traces the executed instructions
//
// Contributors: Andreas Traber, ETHZ <[email protected]>
// Davide Schiavone, OpenHW Group <[email protected]>
// Pascal Gouedo, Dolphin Design <[email protected]>
// Copyright 2018 ETH Zurich and University of Bologna.
// Copyright and related rights are licensed under the Solderpad Hardware
// License, Version 0.51 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
// or agreed to in writing, software, hardware and materials distributed under
// this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

////////////////////////////////////////////////////////////////////////////////
// Engineer: Andreas Traber - [email protected] //
// //
// Additional contributions by: //
// Davide Schiavone - [email protected] //
// //
// Design Name: RISC-V Tracer //
// Project Name: RI5CY //
// Language: SystemVerilog //
// //
// Description: Traces the executed instructions //
// //
////////////////////////////////////////////////////////////////////////////////

`ifdef CV32E40P_TRACE_EXECUTION

Expand Down
28 changes: 16 additions & 12 deletions bhv/include/cv32e40p_rvfi_pkg.sv
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
// Copyright (c) 2020 OpenHW Group
// Copyright 2024 Dolphin Design
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
//
// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// Licensed under the Solderpad Hardware License v 2.1 (the "License");
// you may not use this file except in compliance with the License, or,
// at your option, the Apache License version 2.0.
// You may obtain a copy of the License at
//
// https://solderpad.org/licenses/
// https://solderpad.org/licenses/SHL-2.1/
//
// Unless required by applicable law or agreed to in writing, software
// Unless required by applicable law or agreed to in writing, any work
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0

// Includes to print info about the RVFI output
//
// Contributors: Davide Schiavone, OpenHW Group <[email protected]>
// Halfdan Bechmann, Silicon Labs <[email protected]>
// Yoann Pruvost, Dolphin Design <[email protected]>
////////////////////////////////////////////////////////////////////////////////////
// //
// Contributors: Davide Schiavone, OpenHW Group <[email protected]> //
// Halfdan Bechmann, Silicon Labs <[email protected]> //
// Yoann Pruvost, Dolphin Design <[email protected]> //
// //
// Description: Package to print info on RVFI interface //
// //
////////////////////////////////////////////////////////////////////////////////////

package cv32e40p_rvfi_pkg;
import cv32e40p_pkg::*;
Expand Down
30 changes: 10 additions & 20 deletions bhv/include/cv32e40p_tracer_pkg.sv
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
// Copyright (c) 2020 OpenHW Group
//
// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://solderpad.org/licenses/
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0

// Tracer package
//
// Contributors: Steve Richmond, Silicon Labs <[email protected]>
// Pascal Gouedo, Dolphin Design <[email protected]>
// Copyright 2018 ETH Zurich and University of Bologna.
// Copyright and related rights are licensed under the Solderpad Hardware
// License, Version 0.51 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
// or agreed to in writing, software, hardware and materials distributed under
// this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.


package cv32e40p_tracer_pkg;
import cv32e40p_pkg::*;
Expand Down
25 changes: 23 additions & 2 deletions bhv/insn_trace.sv
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
// Copyright 2022 Dolphin Design
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0
// Copyright 2024 OpenHW Group and Dolphin Design
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
//
// Licensed under the Solderpad Hardware License v 2.1 (the "License");
// you may not use this file except in compliance with the License, or,
// at your option, the Apache License version 2.0.
// You may obtain a copy of the License at
//
// https://solderpad.org/licenses/SHL-2.1/
//
// Unless required by applicable law or agreed to in writing, any work
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

////////////////////////////////////////////////////////////////////////////////////
// //
// Contributors: Yoann Pruvost, Dolphin Design <[email protected]> //
// //
// Description: Macros and Functions to print information on RVFI interface //
// //
////////////////////////////////////////////////////////////////////////////////////

`define DEFINE_CSR(CSR_NAME) \
logic ``CSR_NAME``_we; \
Expand Down
30 changes: 16 additions & 14 deletions bhv/pipe_freeze_trace.sv
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
// Copyright (c) 2023 OpenHW Group
// Copyright 2024 OpenHW Group and Dolphin Design
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
//
// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// Licensed under the Solderpad Hardware License v 2.1 (the "License");
// you may not use this file except in compliance with the License, or,
// at your option, the Apache License version 2.0.
// You may obtain a copy of the License at
//
// https://solderpad.org/licenses/
// https://solderpad.org/licenses/SHL-2.1/
//
// Unless required by applicable law or agreed to in writing, software
// Unless required by applicable law or agreed to in writing, any work
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0

// CV32E40P
//
// Contributors: Yoann Pruvost, Dolphin Design <[email protected]>
////////////////////////////////////////////////////////////////////////////////////
// //
// Contributors: Yoann Pruvost, Dolphin Design <[email protected]> //
// //
// Description: Structures, Functions and Task used to store all information //
// coming from the core pipeline at every posedge. //
// Those information will then be processed by RVFI. //
// //
////////////////////////////////////////////////////////////////////////////////////

/*
* This struct is used to store all information comming from the core at every posedge
* The information will then be processed
*/
typedef struct {
logic is_decoding;
logic is_illegal;
Expand Down
2 changes: 1 addition & 1 deletion rtl/cv32e40p_fp_wrapper.sv
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
module cv32e40p_fp_wrapper
import cv32e40p_apu_core_pkg::*;
#(
parameter FPU_ADDMUL_LAT = 0, // Floating-Point ADDition/MULtiplication computing lane pipeline registers number
parameter FPU_ADDMUL_LAT = 0, // Floating-Point ADDition/MULtiplication computing lane pipeline registers number
parameter FPU_OTHERS_LAT = 0 // Floating-Point COMParison/CONVersion computing lanes pipeline registers number
) (
// Clock and Reset
Expand Down
Loading

0 comments on commit c807945

Please sign in to comment.