diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-03-28 16:53:24 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-03-28 16:53:24 +0200 |
commit | aade2c21fa4bdbeb129122d4b1832459e30aec82 (patch) | |
tree | ca4ca8c659dcc0117352d282f584bd6909c06acf /techlibs | |
parent | a922d705d4c5e5c2f0cfc59f31fa11901ef307e1 (diff) | |
parent | 3197b6c3721b4985b5a5e4223ce7092e27f750c7 (diff) | |
download | yosys-aade2c21fa4bdbeb129122d4b1832459e30aec82.tar.gz yosys-aade2c21fa4bdbeb129122d4b1832459e30aec82.tar.bz2 yosys-aade2c21fa4bdbeb129122d4b1832459e30aec82.zip |
Merge pull request #139 from azonenberg/master
Add GreenPak4 LF oscillator support, renamed internal cell for consistency
Diffstat (limited to 'techlibs')
-rw-r--r-- | techlibs/greenpak4/cells_sim.v | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/techlibs/greenpak4/cells_sim.v b/techlibs/greenpak4/cells_sim.v index 4602c6cc4..6b5100f75 100644 --- a/techlibs/greenpak4/cells_sim.v +++ b/techlibs/greenpak4/cells_sim.v @@ -55,10 +55,52 @@ module GP_4LUT(input IN0, IN1, IN2, IN3, output OUT); assign OUT = INIT[{IN3, IN2, IN1, IN0}]; endmodule -module GP4_VDD(output OUT); +module GP_VDD(output OUT); assign OUT = 1; endmodule -module GP4_VSS(output OUT); +module GP_VSS(output OUT); assign OUT = 0; endmodule + +module GP_LFOSC(input PWRDN, output reg CLKOUT); + + parameter PWRDN_EN = 0; + parameter AUTO_PWRDN = 0; + parameter OUT_DIV = 1; + + initial CLKOUT = 0; + + always begin + if(PWRDN) + clkout = 0; + else begin + //half period of 1730 Hz + #289017; + clkout = ~clkout; + end + end + +endmodule + +module GP_COUNT8(input CLK, input wire RST, output reg OUT); + + parameter RESET_MODE = "RISING"; + + parameter COUNT_TO = 8'h1; + parameter CLKIN_DIVIDE = 1; + + //more complex hard IP blocks are not supported for simulation yet + +endmodule + +module GP_COUNT14(input CLK, input wire RST, output reg OUT); + + parameter RESET_MODE = "RISING"; + + parameter COUNT_TO = 14'h1; + parameter CLKIN_DIVIDE = 1; + + //more complex hard IP blocks are not supported for simulation yet + +endmodule |