blob: 4acf129c6537cf44801266556754f42c9640dec8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
|