Line 1... |
Line 1... |
|
-------------------------------------------------------------------------------
|
|
--
|
|
-- Design: tinyVLIW8 soft-core processor
|
|
-- Author: Oliver Stecklina <stecklina@ihp-microelectronics.com>
|
|
-- Date: 24.10.2013
|
|
-- File: regSet.vhd
|
|
--
|
|
-------------------------------------------------------------------------------
|
|
--
|
|
-- Description : This unit is the register set unit of the 8-bit tinyVLIW8
|
|
-- vliw processor.
|
|
--
|
|
-------------------------------------------------------------------------------
|
|
--
|
|
-- Copyright (C) 2015 IHP GmbH, Frankfurt (Oder), Germany
|
|
--
|
|
-- This code is free software. It is licensed under the EUPL, Version 1.1
|
|
-- or - as soon they will be approved by the European Commission - subsequent
|
|
-- versions of the EUPL (the "License").
|
|
-- You may redistribute this code and/or modify it under the terms of this
|
|
-- License.
|
|
-- You may not use this work except in compliance with the License.
|
|
-- You may obtain a copy of the License at:
|
|
--
|
|
-- http://joinup.ec.europa.eu/software/page/eupl/licence-eupl
|
|
--
|
|
-- Unless required by applicable law or agreed to in writing, software
|
|
-- distributed under the License is distributed on an "AS IS" basis,
|
|
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
-- See the License for the specific language governing permissions and
|
|
-- limitations under the License.
|
|
--
|
|
-------------------------------------------------------------------------------
|
|
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_arith.all;
|
use ieee.std_logic_arith.all;
|
|
|
entity vliwProc_regSet is
|
entity vliwProc_regSet is
|
Line 33... |
Line 67... |
|
|
signal irqReg0_s : std_logic_vector(7 downto 0);
|
signal irqReg0_s : std_logic_vector(7 downto 0);
|
signal irqReg1_s : std_logic_vector(7 downto 0);
|
signal irqReg1_s : std_logic_vector(7 downto 0);
|
signal irqReg2_s : std_logic_vector(7 downto 0);
|
signal irqReg2_s : std_logic_vector(7 downto 0);
|
signal irqReg3_s : std_logic_vector(7 downto 0);
|
signal irqReg3_s : std_logic_vector(7 downto 0);
|
|
signal irqReg4_s : std_logic_vector(7 downto 0);
|
|
signal irqReg5_s : std_logic_vector(7 downto 0);
|
|
|
signal reg0_s : std_logic_vector(7 downto 0);
|
signal reg0_s : std_logic_vector(7 downto 0);
|
signal reg1_s : std_logic_vector(7 downto 0);
|
signal reg1_s : std_logic_vector(7 downto 0);
|
signal reg2_s : std_logic_vector(7 downto 0);
|
signal reg2_s : std_logic_vector(7 downto 0);
|
signal reg3_s : std_logic_vector(7 downto 0);
|
signal reg3_s : std_logic_vector(7 downto 0);
|
Line 103... |
Line 139... |
if (rst_n = '0') then
|
if (rst_n = '0') then
|
irqReg0_s <= (others => '0');
|
irqReg0_s <= (others => '0');
|
irqReg1_s <= (others => '0');
|
irqReg1_s <= (others => '0');
|
irqReg2_s <= (others => '0');
|
irqReg2_s <= (others => '0');
|
irqReg3_s <= (others => '0');
|
irqReg3_s <= (others => '0');
|
|
irqReg4_s <= (others => '0');
|
|
irqReg5_s <= (others => '0');
|
|
|
reg0_s <= (others => '0');
|
reg0_s <= (others => '0');
|
reg1_s <= (others => '0');
|
reg1_s <= (others => '0');
|
reg2_s <= (others => '0');
|
reg2_s <= (others => '0');
|
reg3_s <= (others => '0');
|
reg3_s <= (others => '0');
|
Line 139... |
Line 177... |
irqReg3_s <= aluRegData_s;
|
irqReg3_s <= aluRegData_s;
|
else
|
else
|
reg3_s <= aluRegData_s;
|
reg3_s <= aluRegData_s;
|
end if;
|
end if;
|
elsif (aluRegSel_s = "100") then
|
elsif (aluRegSel_s = "100") then
|
|
if (irqEn_s = '1') then
|
|
irqReg4_s <= aluRegData_s;
|
|
else
|
reg4_s <= aluRegData_s;
|
reg4_s <= aluRegData_s;
|
|
end if;
|
elsif (aluRegSel_s = "101") then
|
elsif (aluRegSel_s = "101") then
|
|
if (irqEn_s = '1') then
|
|
irqReg5_s <= aluRegData_s;
|
|
else
|
reg5_s <= aluRegData_s;
|
reg5_s <= aluRegData_s;
|
|
end if;
|
elsif (aluRegSel_s = "110") then
|
elsif (aluRegSel_s = "110") then
|
reg6_s <= aluRegData_s;
|
reg6_s <= aluRegData_s;
|
elsif (aluRegSel_s = "111") then
|
elsif (aluRegSel_s = "111") then
|
reg7_s <= aluRegData_s;
|
reg7_s <= aluRegData_s;
|
end if;
|
end if;
|
Line 175... |
Line 221... |
irqReg3_s <= ldstRegData_s;
|
irqReg3_s <= ldstRegData_s;
|
else
|
else
|
reg3_s <= ldstRegData_s;
|
reg3_s <= ldstRegData_s;
|
end if;
|
end if;
|
elsif (ldstRegSel_s = "100") then
|
elsif (ldstRegSel_s = "100") then
|
|
if (irqEn_s = '1') then
|
|
irqReg4_s <= ldstRegData_s;
|
|
else
|
reg4_s <= ldstRegData_s;
|
reg4_s <= ldstRegData_s;
|
|
end if;
|
elsif (ldstRegSel_s = "101") then
|
elsif (ldstRegSel_s = "101") then
|
|
if (irqEn_s = '1') then
|
|
irqReg5_s <= ldstRegData_s;
|
|
else
|
reg5_s <= ldstRegData_s;
|
reg5_s <= ldstRegData_s;
|
|
end if;
|
elsif (ldstRegSel_s = "110") then
|
elsif (ldstRegSel_s = "110") then
|
reg6_s <= ldstRegData_s;
|
reg6_s <= ldstRegData_s;
|
elsif (ldstRegSel_s = "111") then
|
elsif (ldstRegSel_s = "111") then
|
reg7_s <= ldstRegData_s;
|
reg7_s <= ldstRegData_s;
|
end if;
|
end if;
|
Line 209... |
Line 263... |
reg1_s;
|
reg1_s;
|
reg2 <= irqReg2_s when irqEn_s = '1' else
|
reg2 <= irqReg2_s when irqEn_s = '1' else
|
reg2_s;
|
reg2_s;
|
reg3 <= irqReg3_s when irqEn_s = '1' else
|
reg3 <= irqReg3_s when irqEn_s = '1' else
|
reg3_s;
|
reg3_s;
|
reg4 <= reg4_s;
|
reg4 <= irqReg4_s when irqEn_s = '1' else
|
reg5 <= reg5_s;
|
reg4_s;
|
|
reg5 <= irqReg5_s when irqEn_s = '1' else
|
|
reg5_s;
|
reg6 <= reg6_s;
|
reg6 <= reg6_s;
|
reg7 <= reg7_s;
|
reg7 <= reg7_s;
|
|
|
END behavior;
|
END behavior;
|
|
|
No newline at end of file
|
No newline at end of file
|