data/full_repos/permissive/45230555/src/tail_offset.v
1: b"%Error: data/full_repos/permissive/45230555/src/tail_offset.v:1: syntax error, unexpected '$', expecting '['\nmodule tail_offset (ir, ${ range(16).map(e => 'toff_' + e + '_0').join(', ') });\n                        ^\n%Error: data/full_repos/permissive/45230555/src/tail_offset.v:10: syntax error, unexpected '$', expecting IDENTIFIER or '=' or do or final\nreg [3:0] ${ range(16).map(e => 'toff_' + e + '_' + e).join(', ') };\n          ^\n%Error: data/full_repos/permissive/45230555/src/tail_offset.v:12: syntax error, unexpected '$', expecting IDENTIFIER or '=' or do or final\nreg [3:0] ${ range(16).map(e => 'ir' + e ).join(', ') };\n          ^\n%Error: data/full_repos/permissive/45230555/src/tail_offset.v:13: syntax error, unexpected '[', expecting TYPE-IDENTIFIER\n<% var res = [];\n             ^\n%Error: data/full_repos/permissive/45230555/src/tail_offset.v:18: syntax error, unexpected '$', expecting IDENTIFIER or '=' or do or final\nreg [3:0] ${ res.join(', ') };\n          ^\n%Error: data/full_repos/permissive/45230555/src/tail_offset.v:20: syntax error, unexpected '$', expecting IDENTIFIER or do or final\nwire [3:0] ${ range(1, 15).map(e => 'tlen_' + e).join(', ') };\n           ^\n%Error: data/full_repos/permissive/45230555/src/tail_offset.v:36: syntax error, unexpected '[', expecting TYPE-IDENTIFIER\n<% var res = [];\n             ^\n%Error: Exiting due to 7 error(s)\n"
module tail_offset (ir, ${ range(16).map(e => 'toff_' + e + '_0').join(', ') });

input  [63:0] ir;
output [3:0] ${
    range(16)
    .map(e => 'toff_' + e + '_0')
    .join(', ')
};

reg [3:0] ${ range(16).map(e => 'toff_' + e + '_' + e).join(', ') };

reg [3:0] ${ range(16).map(e => 'ir' + e ).join(', ') };
<% var res = [];
    sklansky(12, e => {
        res.push('toff_' + e.res.hi + '_' + e.res.lo);
    });
%>
reg [3:0] ${ res.join(', ') };

wire [3:0] ${ range(1, 15).map(e => 'tlen_' + e).join(', ') };

${ range(1, 14)
    .map(e => 'tail_length u_len' + e + ' (.ir(ir' + e + '), .len(tlen_' + e + '));' )
    .join('\n')
}

always @ (ir) { ${
    rangeRight(16)
    .map(e => 'ir' + e)
    .join(', ')
} } = ir;

always @ ( ${
    range(12).map(e => 'toff_' + e + '_' + e).join(', ')
} )
<% var res = [];
    sklansky(12, e => {
        res.push(
            '  toff_' + e.res.hi + '_' + e.res.lo +
            ' = toff_' + e.left.hi + '_' + e.left.lo +
            ' + toff_' + e.right.hi + '_' + e.right.lo + ';'
        );
    });
%>
begin
${ res.join('\n') };
end








endmodule
module tail_offset (ir, ${ range(16).map(e => 'toff_' + e + '_0').join(', ') });


input  [63:0] ir;
output [3:0] ${
    range(16)
    .map(e => 'toff_' + e + '_0')
    .join(', ')
};

reg [3:0] ${ range(16).map(e => 'toff_' + e + '_' + e).join(', ') };

reg [3:0] ${ range(16).map(e => 'ir' + e ).join(', ') };
<% var res = [];
    sklansky(12, e => {
        res.push('toff_' + e.res.hi + '_' + e.res.lo);
    });
%>
reg [3:0] ${ res.join(', ') };

wire [3:0] ${ range(1, 15).map(e => 'tlen_' + e).join(', ') };

${ range(1, 14)
    .map(e => 'tail_length u_len' + e + ' (.ir(ir' + e + '), .len(tlen_' + e + '));' )
    .join('\n')
}

always @ (ir) { ${
    rangeRight(16)
    .map(e => 'ir' + e)
    .join(', ')
} } = ir;

always @ ( ${
    range(12).map(e => 'toff_' + e + '_' + e).join(', ')
} )
<% var res = [];
    sklansky(12, e => {
        res.push(
            '  toff_' + e.res.hi + '_' + e.res.lo +
            ' = toff_' + e.left.hi + '_' + e.left.lo +
            ' + toff_' + e.right.hi + '_' + e.right.lo + ';'
        );
    });
%>
begin
${ res.join('\n') };
end








endmodule