Skip to content

Commit e82de64

Browse files
committed
comments and readme
1 parent 11696aa commit e82de64

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This array multiplier is based on an example from the book: VHDL: Modular Design
2+
and Synthesis of Cores and Systems on pages 306-308 with some modifications.
3+
Addition to that code is tested with VUnit testing library.

components-and-cores/arithmetic/array-multiplier/array_multiplier.vhd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
library ieee;
22
use ieee.std_logic_1164.all;
33

4-
4+
-- Array multiplier based on the book: VHDL: Modular Design and Synthesis of Cores
5+
-- and Systems on page 307.
56
entity array_multiplier is
67
port(
78
x_in : in std_logic_vector;
@@ -16,6 +17,7 @@ architecture rtl of array_multiplier is
1617

1718
signal xi, yi, pi, ci : std_logic_2d_t;
1819
begin
20+
-- Generate cells of bit_multipliers in form of two dimensional array.
1921
rows: for i in x_in'range generate
2022
cols: for j in y_in'range generate
2123
cell: entity work.bit_multiplier port map(
@@ -25,13 +27,14 @@ begin
2527
end generate;
2628
end generate;
2729

28-
30+
-- Generate left and right side of signals used by the array multiplier.
2931
right_and_left_side: for i in x_in'range generate
3032
xi(i, 0) <= x_in(i);
3133
ci(i, 0) <= '0';
3234
pi(i+1, y_in'length) <= ci(i, y_in'length);
3335
end generate;
3436

37+
-- Generate top and bottom side of signals used by the array multiplier.
3538
top_and_bottom_side: for i in y_in'range generate
3639
yi(0, i) <= y_in(i);
3740
pi(0, i+1) <= '0';

components-and-cores/arithmetic/array-multiplier/bit_multiplier.vhd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ library ieee;
22
use ieee.std_logic_1164.all;
33

44

5-
-- bit_multiplier based on the book: VHDL: Modular Design and Synthesis of Cores
5+
-- Bit multiplier based on the book: VHDL: Modular Design and Synthesis of Cores
66
-- and Systems on page 307.
77
entity bit_multiplier is
88
port (

0 commit comments

Comments
 (0)