Fixed a problem with the generated verilog code for the ROM component

This commit is contained in:
Ivan de Jesus Deras 2018-06-07 14:28:06 -06:00
parent 9af27c79cd
commit 922a09eef7
2 changed files with 2 additions and 4 deletions

View File

@ -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;

View File

@ -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) {