aboutsummaryrefslogtreecommitdiff
path: root/VHDL.wiki
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-19 11:42:05 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-19 11:42:05 +0100
commit10b1c4245aa9e005a2f9315bfe0af33384030772 (patch)
tree01dda3977282a5d8e68b37760ef8e0c918969f88 /VHDL.wiki
parentTue, 19 Feb 2019 11:33:29 +0100 (diff)
downloadwiki-public-10b1c4245aa9e005a2f9315bfe0af33384030772.tar.gz
wiki-public-10b1c4245aa9e005a2f9315bfe0af33384030772.tar.xz
Tue, 19 Feb 2019 11:42:05 +0100
Diffstat (limited to 'VHDL.wiki')
-rw-r--r--VHDL.wiki22
1 files changed, 21 insertions, 1 deletions
diff --git a/VHDL.wiki b/VHDL.wiki
index 216b9e4..2570344 100644
--- a/VHDL.wiki
+++ b/VHDL.wiki
@@ -11,6 +11,8 @@
- [[#VHDL#Typer av satser#with-select-when|with-select-when]]
- [[#VHDL#Typer av satser#when-else|when-else]]
- [[#VHDL#Operatorer|Operatorer]]
+ - [[#VHDL#Bibliotek|Bibliotek]]
+ - [[#VHDL#Bibliotek#Numeric_std|Numeric_std]]
= VHDL =
@@ -197,4 +199,22 @@ end architecture behavior2;
}}}
== Operatorer ==
-- `&` :: konkattenerirng, $(`0' \& `1' = ``01'')$
+- `&` :: konkattenerirng, (`'0' & '1' = "01"`).
+
+== Bibliotek ==
+=== Numeric_std ===
+{{{VHDL
+use ieee.numeric_std.all
+}}}
+
+Låter oss även hantera en bitvektor som ett tal.
+
+{{{VHDL
+signal q : unsigned (3 downto 0);
+
+q <= q + 1;
+if q = 10 ...
+ q <= "0011";
+ q(0) <= '1';
+}}}
+