-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatrix_mult.vhd.bak
57 lines (45 loc) · 1.51 KB
/
matrix_mult.vhd.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-- entity name: matrix_mult
-- Stephen Carter - 260500858
-- Copyright (C) 2015 Stephen Carter
-- Version 1.0
-- Author: Stephen Carter; [email protected]
-- Date: Feb. 07, 2016
-- This circuit determines when two 7-bit numbers, A and B, are equal.
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all; -- arithmetic operators
use ieee.std_logic_unsigned.all; -- Treat vectors as unsigned
entity matrix_mult is
port( p1 : in std_logic_vector(3 downto 0);
p2 : in std_logic_vector(3 downto 0);
p3 : in std_logic_vector(3 downto 0);
k11 : in std_logic_vector(3 downto 0);
k12 : in std_logic_vector(3 downto 0);
k13 : in std_logic_vector(3 downto 0);
k21 : in std_logic_vector(3 downto 0);
k22 : in std_logic_vector(3 downto 0);
k23 : in std_logic_vector(3 downto 0);
k31 : in std_logic_vector(3 downto 0);
k32 : in std_logic_vector(3 downto 0);
k33 : in std_logic_vector(3 downto 0);
clk : in std_logic;
c1 : out std_logic_vector(3 downto 0);
c2 : out std_logic_vector(3 downto 0);
c3 : out std_logic_vector(3 downto 0);
);
end matrix_mult;
architecture implementation of g48_7bit_comparator is
Signal p1_reg,p2_reg,p3_reg : std_logic_vector(3 downto 0);
Signal c1_reg,c2_reg,c3_reg : std_logic_vector(3 downto 0);
begin
compute_output : process(clk) begin
if(rising_edge(clk)) then
p1_reg <= p1;
p2_reg <= p2;
p3_reg <= p3;
c1_reg <= c1;
c2_reg <= c2;
c3_reg <= c3;
end if;
end process;
end implementation;