Make CPU regfile nonresettable when FPGA symbol is defined, to support BRAM inference

This commit is contained in:
Luke Wren 2021-07-13 01:10:55 +01:00
parent 93c7039ea1
commit 307955c810
3 changed files with 3 additions and 12 deletions

View File

@ -707,6 +707,8 @@ hazard3_regfile_1w2r #(
.RESET_REGS(1),
`elsif FORMAL
.RESET_REGS(1),
`elsif FPGA
.RESET_REGS(0),
`else
.RESET_REGS(1),
`endif

View File

@ -1,4 +1,4 @@
file tb.v
list $HDL/hazard3.f
file $HDL/debug/dm/hazard3_dm.v
list $HDL/debug/dm/hazard3_dm.f

View File

@ -38,14 +38,6 @@ void exit_help(std::string errtext = "") {
exit(-1);
}
enum cmdstate {
S_IDLE = 0,
S_WRITE_SETUP,
S_WRITE_ACCESS,
S_READ_SETUP,
S_READ_ACCESS
};
int main(int argc, char **argv) {
if (argc < 2)
@ -179,9 +171,6 @@ int main(int argc, char **argv) {
top.p_rst__n.set<bool>(true);
top.step();
cmdstate state = S_IDLE;
int idle_counter = 0;
for (int64_t cycle = 0; cycle < max_cycles; ++cycle) {
top.p_clk.set<bool>(false);
top.step();