CDL Modules
riscv_submodules.h
Go to the documentation of this file.
1 
19 /*a Includes
20  */
21 include "riscv.h"
22 include "riscv_internal_types.h"
23 
24 /*a Modules
25  */
26 /*m riscv_i32_decode */
27 extern
28 module riscv_i32_decode( input t_riscv_i32_inst instruction,
29  output t_riscv_i32_decode idecode,
30  input t_riscv_config riscv_config
31 )
32 {
33  timing comb input instruction, riscv_config;
34  timing comb output idecode;
35 }
36 
37 /*m riscv_i32c_decode */
38 extern
39 module riscv_i32c_decode( input t_riscv_i32_inst instruction,
40  output t_riscv_i32_decode idecode,
41  input t_riscv_config riscv_config
42 )
43 {
44  timing comb input instruction, riscv_config;
45  timing comb output idecode;
46 }
47 
48 /*m riscv_e32_decode */
49 extern
50 module riscv_e32_decode( input t_riscv_i32_inst instruction,
51  output t_riscv_i32_decode idecode,
52  input t_riscv_config riscv_config
53 )
54 {
55  timing comb input instruction, riscv_config;
56  timing comb output idecode;
57 }
58 
59 /*m riscv_e32c_decode */
60 extern
61 module riscv_e32c_decode( input t_riscv_i32_inst instruction,
62  output t_riscv_i32_decode idecode,
63  input t_riscv_config riscv_config
64 )
65 {
66  timing comb input instruction, riscv_config;
67  timing comb output idecode;
68 }
69 
70 /*m riscv_i32_alu */
71 extern
72 module riscv_i32_alu( input t_riscv_i32_decode idecode,
73  input t_riscv_word pc,
74  input t_riscv_word rs1,
75  input t_riscv_word rs2,
76  output t_riscv_i32_alu_result alu_result
77 )
78 {
79  timing comb input idecode, pc, rs1, rs2;
80  timing comb output alu_result;
81 }
82 
83 /*m riscv_csrs_minimal */
84 extern
85 module riscv_csrs_minimal( clock clk "RISC-V clock",
86  input bit reset_n "Active low reset",
87  input t_riscv_irqs irqs "Interrupts in to the CPU",
88  input t_riscv_csr_access csr_access "RISC-V CSR access, combinatorially decoded",
89  input t_riscv_word csr_write_data "Write data for the CSR access, later in the cycle than @csr_access possibly",
90  output t_riscv_csr_data csr_data "CSR response (including take interrupt and read data), from the current @a csr_access",
91  input t_riscv_csr_controls csr_controls "Control signals to update the CSRs",
92  output t_riscv_csrs_minimal csrs "CSR values"
93  )
94 {
95  timing to rising clock clk csr_access, csr_write_data, csr_controls, irqs;
96  timing from rising clock clk csr_data, csrs;
97  timing comb input csr_access;
98  timing comb output csr_data;
99 }
100 
101 /*m riscv_i32_muldiv */
102 extern module riscv_i32_muldiv( clock clk,
103  input bit reset_n,
104  input t_riscv_i32_coproc_controls coproc_controls,
105  output t_riscv_i32_coproc_response coproc_response,
106  input t_riscv_config riscv_config
107 )
108 {
109  timing to rising clock clk coproc_controls, riscv_config;
110  timing from rising clock clk coproc_response;
111 }
bit[32] t_riscv_word
Definition: riscv.h:73
Definition: riscv_internal_types.h:332
Definition: riscv_internal_types.h:622
module riscv_csrs_minimal(clock clk, input bit reset_n, input t_riscv_irqs irqs, input t_riscv_csr_access csr_access, input t_riscv_word csr_write_data, output t_riscv_csr_data csr_data, input t_riscv_csr_controls csr_controls, output t_riscv_csrs_minimal csrs)
Definition: riscv_submodules.h:85
Definition: riscv_internal_types.h:573
Definition: riscv_internal_types.h:598
Definition: riscv_internal_types.h:541
module riscv_i32_decode(input t_riscv_i32_inst instruction, output t_riscv_i32_decode idecode, input t_riscv_config riscv_config)
Definition: riscv_submodules.h:28
module riscv_e32c_decode(input t_riscv_i32_inst instruction, output t_riscv_i32_decode idecode, input t_riscv_config riscv_config)
Definition: riscv_submodules.h:61
module riscv_i32_muldiv(clock clk, input bit reset_n, input t_riscv_i32_coproc_controls coproc_controls, output t_riscv_i32_coproc_response coproc_response, input t_riscv_config riscv_config)
Definition: riscv_submodules.h:102
Definition: riscv_internal_types.h:556
Definition: riscv_internal_types.h:609
module riscv_i32_alu(input t_riscv_i32_decode idecode, input t_riscv_word pc, input t_riscv_word rs1, input t_riscv_word rs2, output t_riscv_i32_alu_result alu_result)
Definition: riscv_submodules.h:72
Definition: riscv_internal_types.h:322
Definition: riscv_internal_types.h:315
module riscv_e32_decode(input t_riscv_i32_inst instruction, output t_riscv_i32_decode idecode, input t_riscv_config riscv_config)
Definition: riscv_submodules.h:50
Definition: riscv.h:77
Definition: riscv.h:121
module riscv_i32c_decode(input t_riscv_i32_inst instruction, output t_riscv_i32_decode idecode, input t_riscv_config riscv_config)
Definition: riscv_submodules.h:39