Commit 72a0f7f0 authored by twlostow's avatar twlostow

bugfixes in FIFO generator, added read notifications

git-svn-id: http://svn.ohwr.org/wishbone-gen@22 4537843c-45c2-4d80-8546-c3283569414f
parent f8ead30c
This diff is collapsed.
This diff is collapsed.
......@@ -150,8 +150,12 @@ function calc_size(field, reg)
end
-- iterates for all registers which type is in "accecepted_types", executing function "func" for each register
function foreach_reg(accepted_types, func)
for i,v in ipairs(periph) do
function foreach_reg(accepted_types, func, p)
if(p == nil) then
p = periph;
end
for i,v in ipairs(p) do
if(type(v) == 'table') then
if(v.__type ~= nil and (match(v.__type, accepted_types))) then
func(v);
......
......@@ -228,6 +228,10 @@ function fifo_wire_bus_ports(fifo)
};
function gen_fifo_csr_field(flag, field_prefix, field_name, field_desc, size, type, offset)
if(fifo.flags_bus == nil) then
return;
end
if inset(flag, fifo.flags_bus) then
local f = {
["__type"] = TYPE_FIELD;
......
......@@ -692,8 +692,6 @@ function gen_hdl_code_reg_field(field, reg)
if(field.ackgen_code == nil) then field.ackgen_code= {}; end
table_join(field.ackgen_code, { va(field.ack_read, 0) });
end
end
-- generates VHDL for single register
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment