Skip to content

Commit a703f71

Browse files
unknownunknown
unknown
authored and
unknown
committed
added images of waveforms
1 parent 44524e3 commit a703f71

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+14471
-909
lines changed

LogicalStep_Lab2_top.qsf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,4 +302,5 @@ set_global_assignment -name CDF_FILE output_files/Chain12.cdf
302302
set_global_assignment -name CDF_FILE output_files/Chain13.cdf
303303
set_global_assignment -name CDF_FILE output_files/Chain14.cdf
304304
set_global_assignment -name CDF_FILE output_files/Chain15.cdf
305-
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
305+
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
306+
set_global_assignment -name VECTOR_WAVEFORM_FILE Waveform.vwf

LogicalStep_Lab2_top.qws

2.31 KB
Binary file not shown.

LogicalStep_Lab2_top.vhd

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ architecture SimpleCircuit of LogicalStep_Lab2_top is
2525
);
2626
end component;
2727

28-
component concatenate port (
29-
hexA : in std_logic_vector(3 downto 0);
28+
component concatenate port (
29+
hexA : in std_logic_vector(3 downto 0); -- concatenate hexA and hexB together
3030
hexB : in std_logic_vector(3 downto 0);
3131
output : out std_logic_vector(7 downto 0)
3232
);
3333
end component;
3434

3535
component mux port (
36-
hex_in1, hex_in2 : in std_logic_vector(7 downto 0);
36+
hex_in1, hex_in2 : in std_logic_vector(7 downto 0); -- if selector button is pushed, 1 else 2
3737
mux_select : in std_logic;
3838
hex_out : out std_logic_vector(7 downto 0)
3939
);
4040
end component;
4141

42-
component segment7_mux port (
42+
component segment7_mux port ( ---
4343
clk : in std_logic :='0';
4444
DIN2 : in std_logic_vector(6 downto 0);
4545
DIN1 : in std_logic_vector(6 downto 0);
@@ -49,14 +49,15 @@ architecture SimpleCircuit of LogicalStep_Lab2_top is
4949
);
5050
end component;
5151

52-
component add port(
52+
component add port( -- add hex A and hex B
5353
hexA : in std_logic_vector(3 downto 0);
5454
hexB : in std_logic_vector(3 downto 0);
5555
output : out std_logic_vector(7 downto 0)
5656
);
5757
end component;
5858

59-
component Logic_Processor is port (
59+
component Logic_Processor is port (
60+
-- depending on which button is pressed, different logic operator is applied to hexA and hexB
6061

6162
hexA : in std_logic_vector(3 downto 0);
6263
hexB : in std_logic_vector(3 downto 0);
@@ -102,19 +103,21 @@ begin
102103

103104
--seg7_data <= seg7_A;
104105

106+
107+
------------------ the add (7 segment control)----------------------------
105108

106109

107110
INST1: SevenSegment port map(arithmetic_Result(7 downto 4), seg7_A);
108111
INST2: SevenSegment port map(arithmetic_Result(3 downto 0), seg7_B);
109112
INST3: segment7_mux port map(clkin_50, seg7_B, seg7_A, seg7_data, seg7_char2, seg7_char1);
110-
INST4: concatenate port map( hex_B, hex_A, concatenationResult); -- swapped because of flipped display
113+
INST4: concatenate port map( hex_B, hex_A, concatenationResult);
111114
INST5: add port map( hex_B, hex_A, sumResult);
112115
INST6: mux port map(sumResult, concatenationResult, pb(3), arithmetic_Result);
113116

114117

118+
----------------------------------------- the led control --------------------
115119

116-
117-
INST7: Logic_Processor port map(hex_A, hex_B, pb (2 downto 0), logicOutput); -- reverted at the lower level
120+
INST7: Logic_Processor port map(hex_A, hex_B, pb (2 downto 0), logicOutput);
118121
INST8: mux port map(sumResult, logicOutput, pb(3), leds);
119122

120123
end SimpleCircuit;

0 commit comments

Comments
 (0)