-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Futil changes #1
base: main
Are you sure you want to change the base?
Conversation
I am not sure why I needed this, because I am not sure if Calyx's standard library of primitives has changed since this was written. Some values were changed that get passed to the SystemVerilog primitives as PARAMETERs, so that Verilator allows the design to pass linting.
When simulating, there is a simulation-time check that Verilator performs that fails in "comb group is_r_type" because "r_type.in" has multiple drivers in the same cycle, despite the guard expression being disjoint (mutually exclusive?). The following commands produces the simulator and necessary memory collateral. $ pwd ~/calyx $ ./target/debug/fud2 ./calyx-riscv/src/main.futil \ --from calyx \ -o test.exe \ -s sim.data=./calyx-riscv/data/simple.json \ --keep $ python3 ./.fud2-working/json-dat.py \ --from-json ./calyx-riscv/data/simple.json \ --out_dir=sim_data/ $ ./test.exe +DATA=./sim_data +CYCLE_LIMIT=500
I haven't looked closely at the changes yet. However, the changes seem to produce the wrong results on
|
With my branch, yes. I get that exact output. $ fud2 riscv-to-calyx/data/simple.s --to riscv-decode --keep
ERROR:root:Memory contains the value: `0xxxxxxxxx', which is uninitialized. This happens when the Calyx design attempts to read a port that is not connected to anything. Try to generate a VCD file using `--to vcd` and look for signals that are not driven in a given cycle.
ERROR:root:Memory contains the value: `0xxxxxxxxx', which is uninitialized. This happens when the Calyx design attempts to read a port that is not connected to anything. Try to generate a VCD file using `--to vcd` and look for signals that are not driven in a given cycle.
ERROR:root:Memory contains the value: `0xxxxxxxxx', which is uninitialized. This happens when the Calyx design attempts to read a port that is not connected to anything. Try to generate a VCD file using `--to vcd` and look for signals that are not driven in a given cycle.
ERROR:root:Memory contains the value: `0xxxxxxxxx', which is uninitialized. This happens when the Calyx design attempts to read a port that is not connected to anything. Try to generate a VCD file using `--to vcd` and look for signals that are not driven in a given cycle.
ERROR:root:Memory contains the value: `0xxxxxxxxx', which is uninitialized. This happens when the Calyx design attempts to read a port that is not connected to anything. Try to generate a VCD file using `--to vcd` and look for signals that are not driven in a given cycle.
ERROR:root:Memory contains the value: `0xxxxxxxxx', which is uninitialized. This happens when the Calyx design attempts to read a port that is not connected to anything. Try to generate a VCD file using `--to vcd` and look for signals that are not driven in a given cycle.
ERROR:root:Memory contains the value: `0xxxxxxxxx', which is uninitialized. This happens when the Calyx design attempts to read a port that is not connected to anything. Try to generate a VCD file using `--to vcd` and look for signals that are not driven in a given cycle.
ERROR:root:Memory contains the value: `0xxxxxxxxx', which is uninitialized. This happens when the Calyx design attempts to read a port that is not connected to anything. Try to generate a VCD file using `--to vcd` and look for signals that are not driven in a given cycle.
ERROR:root:Memory contains the value: `0xxxxxxxxx', which is uninitialized. This happens when the Calyx design attempts to read a port that is not connected to anything. Try to generate a VCD file using `--to vcd` and look for signals that are not driven in a given cycle.
ERROR:root:Memory contains the value: `0xxxxxxxxx', which is uninitialized. This happens when the Calyx design attempts to read a port that is not connected to anything. Try to generate a VCD file using `--to vcd` and look for signals that are not driven in a given cycle.
ERROR:root:Memory contains the value: `0xxxxxxxxx', which is uninitialized. This happens when the Calyx design attempts to read a port that is not connected to anything. Try to generate a VCD file using `--to vcd` and look for signals that are not driven in a given cycle.
Took 263 cycles
== instructions ==
0: addi x10, x0, 0
1: addi x11, x0, 10
2: addi x5, x0, 0
3: addi x6, x0, 0
4: bge x6, x11, 1c
5: slli x7, x6, 2
6: add x7, x10, x7
7: lw xxx
8: add x5, x5, x7
9: addi x6, x6, 1
10: J { opcode: 111, rd: 0, imm: 1042943 }
11: addi x10, x5, 0
12: I { opcode: 103, rd: 0, funct3: 0, rs1: 1, imm: 0 }
== registers ==
x0 zero: 0
x1 ra: xxxxxxxx
x2 sp: xxxxxxxx
x3 gp: xxxxxxxx
x4 tp: xxxxxxxx
x5 t0: 0
x6 t1: xxxxxxxx
x7 t2: 0
x8 fp: xxxxxxxx
x9 s1: xxxxxxxx
x10 a0: 0
x11 a1: 0
x12 a2: xxxxxxxx
x13 a3: xxxxxxxx
x14 a4: xxxxxxxx
x15 a5: xxxxxxxx
x16 a6: 0
x17 a7: 0
x18 s2: 0
x19 s3: 0
x20 s4: 0
x21 s5: 0
x22 s6: 0
x23 s7: 0
x24 s8: 0
x25 s9: 0
x26 s10: 0
x27 s11: 0
x28 t3: 0
x29 t4: 0
x30 t5: 0
x31 t6: 0 But this simulation is going through Icarus, while all my simulation-time errors were coming from Verilator. |
The zeros for |
The incorrectness comes from the last commit (cbe67d8), because I change |
These are all the changes I made while debugging why this core would not complete a Verilator simulation. I used the provided memory files and program.
I needed to fix some Verilator lint failures, which is the slicing commit.
I needed to fix some simulation-time checks that the SystemVerilog has
ifdef
-ed to only run under Verilator.At the end, I end up with a simulation problem because
r_type.in
has multiple drivers in a single clock cycle.Below is a minimum transcript of what I did/was doing to reach this point.