diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-19 11:42:05 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-19 11:42:05 +0100 |
commit | 10b1c4245aa9e005a2f9315bfe0af33384030772 (patch) | |
tree | 01dda3977282a5d8e68b37760ef8e0c918969f88 | |
parent | Tue, 19 Feb 2019 11:33:29 +0100 (diff) | |
download | wiki-public-10b1c4245aa9e005a2f9315bfe0af33384030772.tar.gz wiki-public-10b1c4245aa9e005a2f9315bfe0af33384030772.tar.xz |
Tue, 19 Feb 2019 11:42:05 +0100
Diffstat (limited to '')
-rw-r--r-- | VHDL.wiki | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -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'; +}}} + |