aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit/lsp/files/adder.vhdl
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-01-06 13:43:46 +0100
committertgingold <tgingold@users.noreply.github.com>2021-01-07 18:44:50 +0100
commitcb3c1053a36c0c80167c5af3404693eabd898f6c (patch)
tree7529fae373ff5d59cff38e6db12ba06690c3679a /testsuite/pyunit/lsp/files/adder.vhdl
parentd3ad83012baca2e80bb4f34c8ccbf1f52c2f9100 (diff)
downloadghdl-cb3c1053a36c0c80167c5af3404693eabd898f6c.tar.gz
ghdl-cb3c1053a36c0c80167c5af3404693eabd898f6c.tar.bz2
ghdl-cb3c1053a36c0c80167c5af3404693eabd898f6c.zip
Added json files from https://github.com/ghdl/ghdl-language-server repository.
Diffstat (limited to 'testsuite/pyunit/lsp/files/adder.vhdl')
-rw-r--r--testsuite/pyunit/lsp/files/adder.vhdl16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/pyunit/lsp/files/adder.vhdl b/testsuite/pyunit/lsp/files/adder.vhdl
new file mode 100644
index 000000000..38ff2a60f
--- /dev/null
+++ b/testsuite/pyunit/lsp/files/adder.vhdl
@@ -0,0 +1,16 @@
+
+entity adder is
+ -- `i0`, `i1`, and the carry-in `ci` are inputs of the adder.
+ -- `s` is the sum output, `co` is the carry-out.
+ port (i0, i1 : in bit; ci : in bit; s : out bit; co : out bit);
+end adder;
+
+architecture rtl of adder is
+begin
+ -- This full-adder architecture contains two concurrent assignments.
+ -- Compute the sum.
+ s <= i0 xor i1 xor ci;
+ -- Compute the carry.
+ co <= (i0 and i1) or (i0 and ci) or (i1 and ci);
+end rtl;
+