Add support for field paritycheck. #35

This commit is contained in:
Alex Mykyta
2023-05-15 22:53:17 -07:00
parent 3e691cb5fb
commit 0d82154b9d
16 changed files with 183 additions and 3 deletions

View File

@@ -13,6 +13,11 @@ module {{ds.module_name}} (
{%- endif %}
{%- endfor %}
{%- if ds.has_paritycheck %}
output logic parity_error,
{%- endif %}
{{cpuif.port_declaration|indent(8)}}
{%- if hwif.has_input_struct or hwif.has_output_struct %},{% endif %}
@@ -168,6 +173,22 @@ module {{ds.module_name}} (
{{field_logic.get_implementation()|indent}}
{%- if ds.has_paritycheck %}
//--------------------------------------------------------------------------
// Parity Error
//--------------------------------------------------------------------------
always_ff {{get_always_ff_event(cpuif.reset)}} begin
if({{get_resetsignal(cpuif.reset)}}) begin
parity_error <= '0;
end else begin
automatic logic err = '0;
{{parity.get_implementation()|indent(12)}}
parity_error <= err;
end
end
{%- endif %}
{%- if ds.has_buffered_read_regs %}
//--------------------------------------------------------------------------