URL
https://opencores.org/ocsvn/encore/encore/trunk
[/] [encore/] [trunk/] [fpmult/] [src/] [fpmult.vhdl] - Blame information for rev 6
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
6 |
aloy.amber |
library ieee;
|
2 |
|
|
use ieee.std_logic_1164.all;
|
3 |
|
|
use work.fpmult_comp.all;
|
4 |
|
|
use work.fpmult_stage0_comp.all;
|
5 |
|
|
use work.fpmult_stageN_comp.all;
|
6 |
|
|
use work.fpmult_stage23_comp.all;
|
7 |
|
|
|
8 |
|
|
entity fpmult is
|
9 |
|
|
port(
|
10 |
|
|
clk:in std_logic;
|
11 |
|
|
d:in fpmult_in_type;
|
12 |
|
|
q:out fpmult_out_type
|
13 |
|
|
);
|
14 |
|
|
end;
|
15 |
|
|
|
16 |
|
|
architecture structural of fpmult is
|
17 |
|
|
signal fpmult_stage0_in:fpmult_stage0_in_type;
|
18 |
|
|
signal fpmult_stage0_out:fpmult_stage0_out_type;
|
19 |
|
|
signal fpmult_stage23_in:fpmult_stage23_in_type;
|
20 |
|
|
signal fpmult_stage23_out:fpmult_stage23_out_type;
|
21 |
|
|
type fpmult_stageN_in_array_type is array(23 downto 1) of fpmult_stageN_in_type;
|
22 |
|
|
type fpmult_stageN_out_array_type is array(22 downto 1) of fpmult_stageN_out_type;
|
23 |
|
|
signal fpmult_stageN_in_array:fpmult_stageN_in_array_type;
|
24 |
|
|
signal fpmult_stageN_out_array:fpmult_stageN_out_array_type;
|
25 |
|
|
begin
|
26 |
|
|
fpmult_stage0_in.a<=d.a;
|
27 |
|
|
fpmult_stage0_in.b<=d.b;
|
28 |
|
|
|
29 |
|
|
stage0:fpmult_stage0 port map(clk,fpmult_stage0_in,fpmult_stage0_out);
|
30 |
|
|
|
31 |
|
|
fpmult_stageN_in_array(1)<=fpmult_stage0_out;
|
32 |
|
|
|
33 |
|
|
pipeline:for N in 22 downto 1 generate
|
34 |
|
|
stageN:fpmult_stageN generic map(N) port map(clk,fpmult_stageN_in_array(N),fpmult_stageN_out_array(N));
|
35 |
|
|
fpmult_stageN_in_array(N+1)<=fpmult_stageN_out_array(N);
|
36 |
|
|
end generate pipeline;
|
37 |
|
|
|
38 |
|
|
fpmult_stage23_in<=fpmult_stageN_out_array(22);
|
39 |
|
|
|
40 |
|
|
stage23:fpmult_stage23 port map(clk,fpmult_stage23_in,fpmult_stage23_out);
|
41 |
|
|
|
42 |
|
|
q.p<=fpmult_stage23_out.p;
|
43 |
|
|
end;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.