projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cc8c5e
)
kernel/mem: Only use FF init in read-first emu for mem with init
author
Marcelina Kościelnicka
<mwk@0x04.net>
Mon, 28 Mar 2022 14:14:56 +0000
(16:14 +0200)
committer
Marcelina Kościelnicka
<mwk@0x04.net>
Mon, 28 Mar 2022 15:03:02 +0000
(17:03 +0200)
kernel/mem.cc
patch
|
blob
|
history
diff --git
a/kernel/mem.cc
b/kernel/mem.cc
index 059f8f934612e7431720e29f512015eca3710653..e5e855ef7d4c874bf65fb331036fc03488c47bac 100644
(file)
--- a/
kernel/mem.cc
+++ b/
kernel/mem.cc
@@
-1633,7
+1633,10
@@
void Mem::emulate_read_first(FfInitVals *initvals) {
ff_en.pol_clk = port.clk_polarity;
ff_en.sig_d = compressed.first;
ff_en.sig_q = new_en;;
- ff_en.val_init = Const(State::S0, ff_en.width);
+ if (inits.empty())
+ ff_en.val_init = Const(State::Sx, ff_en.width);
+ else
+ ff_en.val_init = Const(State::S0, ff_en.width);
ff_en.emit();
port.data = new_data;
port.addr = new_addr;