summaryrefslogtreecommitdiff
path: root/Example/counter
diff options
context:
space:
mode:
authorrahul2019-10-15 16:05:40 +0530
committerrahul2019-10-15 16:05:40 +0530
commitda90fa60b3ffa57a7a37bffeb821d8d93cb00dd7 (patch)
treef9dbcae898749f298a430ada69114f5d705de255 /Example/counter
parent7f0123a500130711c464a63d3a06636697ecaf89 (diff)
downloadnghdl-da90fa60b3ffa57a7a37bffeb821d8d93cb00dd7.tar.gz
nghdl-da90fa60b3ffa57a7a37bffeb821d8d93cb00dd7.tar.bz2
nghdl-da90fa60b3ffa57a7a37bffeb821d8d93cb00dd7.zip
Support for Ngspice-31
Diffstat (limited to 'Example/counter')
-rw-r--r--Example/counter/counter.obin7512 -> 0 bytes
-rw-r--r--Example/counter/counter.vhdl30
-rw-r--r--Example/counter/work-obj93.cf4
3 files changed, 19 insertions, 15 deletions
diff --git a/Example/counter/counter.o b/Example/counter/counter.o
deleted file mode 100644
index 442cc73..0000000
--- a/Example/counter/counter.o
+++ /dev/null
Binary files differ
diff --git a/Example/counter/counter.vhdl b/Example/counter/counter.vhdl
index 6e16138..ba14df8 100644
--- a/Example/counter/counter.vhdl
+++ b/Example/counter/counter.vhdl
@@ -1,4 +1,5 @@
library ieee;
+
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
@@ -7,16 +8,23 @@ port(C : in std_logic;
CLR : in std_logic;
Q : out std_logic_vector(3 downto 0));
end counter;
+
architecture bhv of counter is
-signal tmp: std_logic_vector(3 downto 0);
-begin
-process (C, CLR)
-begin
-if (CLR='1') then
-tmp <= "0000";
-elsif (C'event and C='1') then
-tmp <= std_logic_vector(to_unsigned(1+to_integer(unsigned(tmp)), tmp'length));
-end if;
-end process;
-Q <= tmp;
+
+ signal tmp: std_logic_vector(3 downto 0);
+ begin
+ process (C, CLR)
+
+ begin
+ if (CLR='1') then
+ tmp <= "0000";
+
+ elsif (C'event and C='1') then
+ tmp <= std_logic_vector(to_unsigned(1+to_integer(unsigned(tmp)), tmp'length));
+
+ end if;
+
+ end process;
+ Q <= tmp;
+
end bhv; \ No newline at end of file
diff --git a/Example/counter/work-obj93.cf b/Example/counter/work-obj93.cf
deleted file mode 100644
index 46d4772..0000000
--- a/Example/counter/work-obj93.cf
+++ /dev/null
@@ -1,4 +0,0 @@
-v 4
-file . "counter.vhdl" "849ecbdf1a2a5f5cd553b9ca6594e4a3ae1e214a" "20190710170933.911":
- entity counter at 1( 0) + 0 on 13;
- architecture bhv of counter at 11( 229) + 0 on 14;