URL
https://opencores.org/ocsvn/rv01_riscv_core/rv01_riscv_core/trunk
Subversion Repositories rv01_riscv_core
[/] [rv01_riscv_core/] [trunk/] [VHDL/] [RV01_types_pkg.vhd] - Rev 2
Compare with Previous | Blame | View Log
----------------------------------------------------------------- -- -- ----------------------------------------------------------------- -- -- -- Copyright (C) 2015 Stefano Tonello -- -- -- -- This source file may be used and distributed without -- -- restriction provided that this copyright statement is not -- -- removed from the file and that any derivative work contains -- -- the original copyright notice and the associated disclaimer.-- -- -- -- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY -- -- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -- -- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -- -- FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR -- -- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -- -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -- -- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -- -- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -- -- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- -- POSSIBILITY OF SUCH DAMAGE. -- -- -- ----------------------------------------------------------------- --------------------------------------------------------------- -- RV01 constants package --------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; library WORK; use WORK.RV01_CONSTS_PKG.all; package RV01_TYPES_PKG is -- short (signed) data word type subtype SDWORD_T is signed(SDLEN-1 downto 0); -- long (signed) data word type subtype LDWORD_T is signed(LDLEN-1 downto 0); -- short unsigned data word type subtype SDWORDU_T is unsigned(SDLEN-1 downto 0); -- long unsigned data word type subtype LDWORDU_T is unsigned(LDLEN-1 downto 0); -- register identifier type subtype RID_T is integer range 0 to REGNUM-1; -- short shift amount type subtype SHORT_SHIFT_T is integer range 0 to SDLEN-1; -- long shift amount type subtype LONG_SHIFT_T is integer range 0 to LDLEN-1; subtype ADR_T is unsigned(ALEN-1 downto 0); type SDWORD_VEC_T is array (natural range<>) of SDWORD_T; type LDWORD_VEC_T is array (natural range<>) of LDWORD_T; type ADR_VEC_T is array (natural range<>) of ADR_T; end package; package body RV01_TYPES_PKG is end package body;