-
-
Save fayalalebrun/055de56382081b62b47fe2639ae8e000 to your computer and use it in GitHub Desktop.
vhdl ex_amend example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[options] | |
[gold] | |
ghdl --std=08 gold.vhd -e top | |
prep -top top | |
[gate] | |
ghdl --std=08 gate.vhd -e top | |
prep -top top | |
[collect top] | |
join X | |
join Y | |
[partition top] | |
amend X | |
[strategy simple] | |
use sat | |
depth 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library ieee; | |
use ieee.numeric_std.all; | |
use ieee.std_logic_1164.all; | |
entity top is | |
port ( | |
A: in std_logic; | |
B: in std_logic; | |
C: in std_logic; | |
X: out std_logic_vector(1 downto 0); | |
Y: out std_logic_vector(1 downto 0) | |
); | |
end top; | |
architecture rtl of top is | |
begin | |
X <= (A xor B) & not (A xor B); | |
Y <= "01" xor std_logic_vector(unsigned(std_logic_vector'("0") & (C xor X(1))) sll 1); | |
end architecture; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library ieee; | |
use ieee.numeric_std.all; | |
use ieee.std_logic_1164.all; | |
entity top is | |
port ( | |
A: in std_logic; | |
B: in std_logic; | |
C: in std_logic; | |
X: out std_logic_vector(1 downto 0); | |
Y: out std_logic_vector(1 downto 0) | |
); | |
end top; | |
architecture rtl of top is | |
begin | |
X <= std_logic_vector(to_unsigned(1, 2) sll | |
to_integer(unsigned(std_logic_vector'("0") & (A xor B)))); | |
Y <= X xor std_logic_vector(unsigned(std_logic_vector'("0") & C) sll 1); | |
end architecture; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment