mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-15 15:58:41 -04:00
Fixed a problem with the generated verilog code for the ROM component
This commit is contained in:
parent
9af27c79cd
commit
922a09eef7
@ -32,7 +32,6 @@ public class VerilogTemplate implements VerilogElement {
|
||||
private final static String MODULE_PREFIX = "DIG_";
|
||||
|
||||
private final String moduleBaseName;
|
||||
private String moduleName;
|
||||
private final Statement statements;
|
||||
private HashMap<String, Module> modules;
|
||||
|
||||
|
@ -8,12 +8,11 @@
|
||||
?>module <?= moduleName ?> (
|
||||
input <?= aBitRange ?> A,
|
||||
input sel,
|
||||
output <?= dBitRange ?> D
|
||||
output reg <?= dBitRange ?> D
|
||||
);
|
||||
reg <?= dBitRange ?> my_rom [0:<?= (romSize - 1) ?>];
|
||||
reg D;
|
||||
|
||||
always @ (A or sel) begin
|
||||
always @ (*) begin
|
||||
if (~sel)
|
||||
D = <?= elem.Bits ?>'hz;<?
|
||||
if (romSize < romMaxSize) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user