mirror of
https://github.com/annoyatron255/yosys4gal.git
synced 2024-12-22 18:52:23 +00:00
added and_gate_reg
This commit is contained in:
parent
7b27f0f112
commit
2d6f0123cd
3
testcases/and_gate.pcf
Normal file
3
testcases/and_gate.pcf
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
set_io A 2
|
||||||
|
set_io B 3
|
||||||
|
set_io Y 14
|
4
testcases/and_gate_reg.pcf
Normal file
4
testcases/and_gate_reg.pcf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
set_io A 2
|
||||||
|
set_io B 3
|
||||||
|
set_io Y 14
|
||||||
|
set_io clk 1
|
10
testcases/and_gate_reg.v
Normal file
10
testcases/and_gate_reg.v
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
module and_gate (clk, A, B, Y);
|
||||||
|
|
||||||
|
input A, B;
|
||||||
|
output Y;
|
||||||
|
|
||||||
|
always @(posedge clk) begin
|
||||||
|
Y <= A && B;
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
Loading…
Reference in a new issue