Skip to content

Commit

Permalink
regfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshegarty committed Apr 1, 2019
1 parent c049906 commit eeb006d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/systolic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1782,18 +1782,19 @@ setmetatable(regModuleFunctions,{__index=systolicModuleFunctions})
regModuleMT={__index=regModuleFunctions}

function regModuleFunctions:instanceToVerilogStart( instance )

local decl = declareReg(self.type, instance.name, self.initial)

if self.resetValue~=nil then
return " wire "..instance.name.."_RESET;\n"
return decl.." wire "..instance.name.."_RESET;\n"
else
return ""
return decl
end
end

function regModuleFunctions:instanceToVerilog( instance, fnname, inputVar, validVar, CEVar )

if fnname=="delay" or fnname=="set" then
local decl = declareReg(self.type, instance.name, self.initial)
local decl = ""

err( type(inputVar)=="string", "reg:set() or reg:delay() expected an input!")

Expand Down

0 comments on commit eeb006d

Please sign in to comment.