32 lines
531 B
Coq
32 lines
531 B
Coq
|
module top(
|
||
|
input [63:0] key,
|
||
|
output lock
|
||
|
);
|
||
|
|
||
|
reg [63:0] tmp1, tmp2, tmp3, tmp4;
|
||
|
|
||
|
// Stage 1
|
||
|
always @(*) begin
|
||
|
tmp1 = key & 64'hF0F0F0F0F0F0F0F0;
|
||
|
end
|
||
|
|
||
|
// Stage 2
|
||
|
always @(*) begin
|
||
|
tmp2 = tmp1 <<< 5;
|
||
|
end
|
||
|
|
||
|
// Stage 3
|
||
|
always @(*) begin
|
||
|
tmp3 = tmp2 ^ "HACKERS!";
|
||
|
end
|
||
|
|
||
|
// Stage 4
|
||
|
always @(*) begin
|
||
|
tmp4 = tmp3 - 12345678;
|
||
|
end
|
||
|
|
||
|
// I have the feeling "lock" should be 1'b1
|
||
|
assign lock = tmp4 == 64'h5443474D489DFDD3;
|
||
|
|
||
|
endmodule
|