forked from grahamedgecombe/icicle
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrvfi_wrapper.sv
55 lines (46 loc) · 1.46 KB
/
rvfi_wrapper.sv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module rvfi_wrapper (
input clock,
input reset,
`RVFI_OUTPUTS
);
/* instruction memory bus */
(* keep *) logic [31:0] instr_address;
(* keep *) logic instr_read;
(* keep *) logic [31:0] instr_read_value;
(* keep *) logic instr_ready;
(* keep *) logic instr_fault;
/* data memory bus */
(* keep *) logic [31:0] data_address;
(* keep *) logic data_read;
(* keep *) logic data_write;
(* keep *) logic [31:0] data_read_value;
(* keep *) logic [3:0] data_write_mask;
(* keep *) logic [31:0] data_write_value;
(* keep *) logic data_ready;
(* keep *) logic data_fault;
/* timer */
(* keep *) logic [63:0] cycle;
rv32 uut (
.clk(clock),
.reset(reset),
`RVFI_CONN,
/* instruction memory bus */
.instr_address_out(instr_address),
.instr_read_out(instr_read),
.instr_read_value_in(instr_read_value),
.instr_ready_in(instr_ready),
.instr_fault_in(instr_fault),
/* data memory bus */
.data_address_out(data_address),
.data_read_out(data_read),
.data_write_out(data_write),
.data_read_value_in(data_read_value),
.data_write_mask_out(data_write_mask),
.data_write_value_out(data_write_value),
.data_ready_in(data_ready),
.data_fault_in(data_fault),
/* timer */
.cycle_out(cycle)
);
assign data_fault = !`RISCV_FORMAL_VALIDADDR(data_address);
endmodule