From 10b1c4245aa9e005a2f9315bfe0af33384030772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 19 Feb 2019 11:42:05 +0100 Subject: Tue, 19 Feb 2019 11:42:05 +0100 --- VHDL.wiki | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'VHDL.wiki') 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'; +}}} + -- cgit v1.2.3