3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-29 11:55:52 +00:00

Adding latch tests for shift&mask AST dynamic part-select enhancements

This commit is contained in:
diego 2020-06-09 15:17:01 -05:00
parent 5c426d2bff
commit 3c2a1171ff
18 changed files with 326 additions and 69 deletions

View file

@ -0,0 +1,18 @@
`default_nettype none
module latch_002_gate(dword, vect, sel, st);
output reg [63:0] dword;
input wire [7:0] vect;
input wire [7:0] sel;
input wire st;
reg [63:0] mask;
reg [63:0] data;
always @*
case (|(st))
1'b 1:
begin
mask = (8'b 11111111)<<((((8)*(sel)))+(0));
data = ((8'b 11111111)&(vect[7:0]))<<((((8)*(sel)))+(0));
dword <= ((dword)&(~(mask)))|(data);
end
endcase
endmodule