diff options
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'; +}}} + |