Line 1... |
Line 1... |
-- #################################################################################################
|
-- #################################################################################################
|
-- # << NEORV32 - CPU Co-Processor: Single-Precision Floating Point Unit (RISC-V "F" Extension) >> #
|
-- # << NEORV32 - CPU Co-Processor: Single-Prec. Floating Point Unit (RISC-V "Zfinx" Extension) >> #
|
-- # ********************************************************************************************* #
|
-- # ********************************************************************************************* #
|
-- # #
|
-- # #
|
-- # !!! WORK-IN-PROGRESS !!! #
|
-- # !!! WORK-IN-PROGRESS !!! #
|
-- # !!! THIS UNIT IS NOT FUNCTIONAL YET !!! #
|
-- # !!! THIS UNIT IS NOT FUNCTIONAL YET !!! #
|
-- # #
|
-- # #
|
-- # ********************************************************************************************* #
|
-- # ********************************************************************************************* #
|
-- # !!! Enabling the F extension does not has an effect on the CPU. If F is enabled, there !!! #
|
-- # The Zfinx floating-point extension uses the integer register file (x) for all FP operations. #
|
-- # !!! will be no traps when trying to execute floating-point instructions, since the main !!! #
|
-- # See the official RISC-V specs (https://github.com/riscv/riscv-zfinx) for more information. #
|
-- # !!! CPU control unit allready provides all necessary F-extension infrastructure. !!! #
|
-- # ********************************************************************************************* #
|
-- # !!! However, all F instructions will always return zero. !!! #
|
-- # !! Enabling the Zfinx extension does not has an effect on the CPU. If F is enabled, there !! #
|
|
-- # !! will be no traps when trying to execute floating-point instructions, since the main !! #
|
|
-- # !! CPU control unit allready provides all necessary Zfinx-extension infrastructure. !! #
|
|
-- # !! However, all Zfinx instructions will always return zero. !! #
|
-- # ********************************************************************************************* #
|
-- # ********************************************************************************************* #
|
-- # BSD 3-Clause License #
|
-- # BSD 3-Clause License #
|
-- # #
|
-- # #
|
-- # Copyright (c) 2021, Stephan Nolting. All rights reserved. #
|
-- # Copyright (c) 2021, Stephan Nolting. All rights reserved. #
|
-- # #
|
-- # #
|
Line 56... |
Line 59... |
rstn_i : in std_ulogic; -- global reset, low-active, async
|
rstn_i : in std_ulogic; -- global reset, low-active, async
|
ctrl_i : in std_ulogic_vector(ctrl_width_c-1 downto 0); -- main control bus
|
ctrl_i : in std_ulogic_vector(ctrl_width_c-1 downto 0); -- main control bus
|
start_i : in std_ulogic; -- trigger operation
|
start_i : in std_ulogic; -- trigger operation
|
-- data input --
|
-- data input --
|
frm_i : in std_ulogic_vector(2 downto 0); -- rounding mode
|
frm_i : in std_ulogic_vector(2 downto 0); -- rounding mode
|
reg_i : in std_ulogic_vector(data_width_c-1 downto 0); -- rf source (rs1)
|
rs1_i : in std_ulogic_vector(data_width_c-1 downto 0); -- rf source 1
|
mem_i : in std_ulogic_vector(data_width_c-1 downto 0); -- memory read-data
|
rs2_i : in std_ulogic_vector(data_width_c-1 downto 0); -- rf source 2
|
-- result and status --
|
-- result and status --
|
fflags_o : out std_ulogic_vector(4 downto 0); -- exception flags
|
|
mem_o : out std_ulogic_vector(data_width_c-1 downto 0); -- memory write-data
|
|
res_o : out std_ulogic_vector(data_width_c-1 downto 0); -- operation result
|
res_o : out std_ulogic_vector(data_width_c-1 downto 0); -- operation result
|
|
fflags_o : out std_ulogic_vector(4 downto 0); -- exception flags
|
valid_o : out std_ulogic -- data output valid
|
valid_o : out std_ulogic -- data output valid
|
);
|
);
|
end neorv32_cpu_cp_fpu;
|
end neorv32_cpu_cp_fpu;
|
|
|
architecture neorv32_cpu_cp_fpu_rtl of neorv32_cpu_cp_fpu is
|
architecture neorv32_cpu_cp_fpu_rtl of neorv32_cpu_cp_fpu is
|
|
|
begin
|
begin
|
|
|
-- There is nothing to see here yet -------------------------------------------------------
|
-- There is nothing to see here yet -------------------------------------------------------
|
-- -------------------------------------------------------------------------------------------
|
-- -------------------------------------------------------------------------------------------
|
fflags_o <= (others => '0');
|
|
mem_o <= (others => '0');
|
|
res_o <= (others => '0');
|
res_o <= (others => '0');
|
|
fflags_o <= (others => '0');
|
valid_o <= start_i;
|
valid_o <= start_i;
|
|
|
|
|
end neorv32_cpu_cp_fpu_rtl;
|
end neorv32_cpu_cp_fpu_rtl;
|
|
|
No newline at end of file
|
No newline at end of file
|