mirror of
https://github.com/corundum/corundum.git
synced 2025-01-30 08:32:52 +08:00
Fix crosspoint wrapper generator
This commit is contained in:
parent
c759ff03b7
commit
b4cebd8394
@ -85,7 +85,8 @@ module {{name}} #
|
||||
parameter LAST_ENABLE = 1,
|
||||
parameter ID_ENABLE = 0,
|
||||
parameter ID_WIDTH = 8,
|
||||
parameter DEST_WIDTH = {{cm}},
|
||||
parameter DEST_ENABLE = 0,
|
||||
parameter DEST_WIDTH = 8,
|
||||
parameter USER_ENABLE = 1,
|
||||
parameter USER_WIDTH = 1
|
||||
)
|
||||
@ -115,8 +116,14 @@ module {{name}} #
|
||||
output wire m{{'%02d'%p}}_axis_tlast,
|
||||
output wire [ID_WIDTH-1:0] m{{'%02d'%p}}_axis_tid,
|
||||
output wire [DEST_WIDTH-1:0] m{{'%02d'%p}}_axis_tdest,
|
||||
output wire [USER_WIDTH-1:0] m{{'%02d'%p}}_axis_tuser{% if not loop.last %},{% endif %}
|
||||
{% endfor -%}
|
||||
output wire [USER_WIDTH-1:0] m{{'%02d'%p}}_axis_tuser,
|
||||
{% endfor %}
|
||||
/*
|
||||
* Control
|
||||
*/
|
||||
{%- for p in range(n) %}
|
||||
input wire [{{cm-1}}:0] m{{'%02d'%p}}_select{% if not loop.last %},{% endif %}
|
||||
{%- endfor %}
|
||||
);
|
||||
|
||||
axis_crosspoint #(
|
||||
@ -128,6 +135,7 @@ axis_crosspoint #(
|
||||
.LAST_ENABLE(LAST_ENABLE),
|
||||
.ID_ENABLE(ID_ENABLE),
|
||||
.ID_WIDTH(ID_WIDTH),
|
||||
.DEST_ENABLE(DEST_ENABLE),
|
||||
.DEST_WIDTH(DEST_WIDTH),
|
||||
.USER_ENABLE(USER_ENABLE),
|
||||
.USER_WIDTH(USER_WIDTH)
|
||||
@ -150,7 +158,9 @@ axis_crosspoint_inst (
|
||||
.m_axis_tlast({ {% for p in range(n-1,-1,-1) %}m{{'%02d'%p}}_axis_tlast{% if not loop.last %}, {% endif %}{% endfor %} }),
|
||||
.m_axis_tid({ {% for p in range(n-1,-1,-1) %}m{{'%02d'%p}}_axis_tid{% if not loop.last %}, {% endif %}{% endfor %} }),
|
||||
.m_axis_tdest({ {% for p in range(n-1,-1,-1) %}m{{'%02d'%p}}_axis_tdest{% if not loop.last %}, {% endif %}{% endfor %} }),
|
||||
.m_axis_tuser({ {% for p in range(n-1,-1,-1) %}m{{'%02d'%p}}_axis_tuser{% if not loop.last %}, {% endif %}{% endfor %} })
|
||||
.m_axis_tuser({ {% for p in range(n-1,-1,-1) %}m{{'%02d'%p}}_axis_tuser{% if not loop.last %}, {% endif %}{% endfor %} }),
|
||||
// Control
|
||||
.select({ {% for p in range(n-1,-1,-1) %}m{{'%02d'%p}}_select{% if not loop.last %}, {% endif %}{% endfor %} })
|
||||
);
|
||||
|
||||
endmodule
|
||||
|
Loading…
x
Reference in New Issue
Block a user