OpenCores
URL https://opencores.org/ocsvn/fpuvhdl/fpuvhdl/trunk

Subversion Repositories fpuvhdl

[/] [fpuvhdl/] [trunk/] [fpuvhdl/] [common/] [fpround_fpround.vhd] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 gmarcus
--
2
-- VHDL Architecture HAVOC.FPround.FPround
3
--
4
-- Created:
5
--          by - Guillermo
6
--          at - ITESM, 11:08:16 07/16/03
7
--
8
-- Generated by Mentor Graphics' HDL Designer(TM) 2002.1b (Build 7)
9
--
10
-- hds interface_start
11
LIBRARY ieee;
12
USE ieee.std_logic_1164.all;
13
USE ieee.std_logic_arith.all;
14
USE ieee.std_logic_unsigned.all;
15
 
16
 
17
ENTITY FPround IS
18
   GENERIC(
19
      SIG_width : integer := 28
20
   );
21
   PORT(
22
      SIG_in  : IN     std_logic_vector (SIG_width-1 DOWNTO 0);
23
      EXP_in  : IN     std_logic_vector (7 DOWNTO 0);
24
      SIG_out : OUT    std_logic_vector (SIG_width-1 DOWNTO 0);
25
      EXP_out : OUT    std_logic_vector (7 DOWNTO 0)
26
   );
27
 
28
-- Declarations
29
 
30
END FPround ;
31
 
32
 
33
-- hds interface_end
34
ARCHITECTURE FPround OF FPround IS
35
BEGIN
36
        EXP_out <= EXP_in;
37
 
38
PROCESS(SIG_in)
39
BEGIN
40
--   IF ((SIG_in(2)='0') OR ((SIG_in(3)='0') AND (SIG_in(1)='0') AND (SIG_in(0)='0'))) THEN
41
--   IF ((SIG_in(2)='0') OR ((SIG_in(3)='0') AND (SIG_in(2)='1') AND (SIG_in(1)='0') AND (SIG_in(0)='0'))) THEN
42
   IF (SIG_in(2)='0') THEN
43
                SIG_out <= SIG_in;
44
   ELSE
45
                SIG_out <= (SIG_in(SIG_width-1 DOWNTO 3) + 1) & "000";
46
        END IF;
47
END PROCESS;
48
 
49
END FPround;
50
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.