projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b86410b
)
Fixed $macc simlib model for zero-config
author
Clifford Wolf
<clifford@clifford.at>
Tue, 16 Sep 2014 06:19:35 +0000
(08:19 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Tue, 16 Sep 2014 06:19:35 +0000
(08:19 +0200)
techlibs/common/simlib.v
patch
|
blob
|
history
diff --git
a/techlibs/common/simlib.v
b/techlibs/common/simlib.v
index 0ad8d14b2b895f0748a3d9b414c2e20ba8cb560e..2d8088adb6435e151e05e8cccebda501c17a4e77 100644
(file)
--- a/
techlibs/common/simlib.v
+++ b/
techlibs/common/simlib.v
@@
-820,7
+820,7
@@
function integer my_clog2;
end
endfunction
-localparam integer num_bits = CONFIG[3:0];
+localparam integer num_bits = CONFIG[3:0]
> 0 ? CONFIG[3:0] : 1
;
localparam integer num_ports = (CONFIG_WIDTH-4) / (2 + 2*num_bits);
localparam integer num_abits = my_clog2(A_WIDTH) > 0 ? my_clog2(A_WIDTH) : 1;