Line 1... |
Line 1... |
-- $Id: rrilib.vhd 314 2010-07-09 17:38:41Z mueller $
|
-- $Id: rlinklib.vhd 348 2010-12-26 15:23:44Z mueller $
|
--
|
--
|
-- Copyright 2007-2010 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
-- Copyright 2007-2010 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
--
|
--
|
-- This program is free software; you may redistribute and/or modify it under
|
-- This program is free software; you may redistribute and/or modify it under
|
-- the terms of the GNU General Public License as published by the Free
|
-- the terms of the GNU General Public License as published by the Free
|
Line 10... |
Line 10... |
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
-- for complete details.
|
-- for complete details.
|
--
|
--
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
-- Package Name: rrilib
|
-- Package Name: rlinklib
|
-- Description: Remote Register Interface components
|
-- Description: Definitions for rlink interface and bus entities
|
--
|
--
|
-- Dependencies: -
|
-- Dependencies: -
|
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2, 11.4; ghdl 0.18-0.26
|
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2, 11.4, 12.1; ghdl 0.18-0.29
|
|
--
|
-- Revision History:
|
-- Revision History:
|
-- Date Rev Version Comment
|
-- Date Rev Version Comment
|
|
-- 2010-12-25 348 3.1.2 drop RL_FLUSH support, add RL_MONI for rlink_core;
|
|
-- new rlink_serport interface;
|
|
-- rename rlink_core_serport->rlink_base_serport
|
|
-- 2010-12-24 347 3.1.1 rename: CP_*->RL->*
|
|
-- 2010-12-22 346 3.1 rename: [cd]crc->[cd]err, ioto->rbnak, ioerr->rberr
|
|
-- 2010-12-04 343 3.0 move rbus components to rbus/rblib; renames
|
|
-- rri_ -> rlink and c_rri -> c_rlink;
|
-- 2010-06-18 306 2.5.1 rename rbus data fields to _rbf_
|
-- 2010-06-18 306 2.5.1 rename rbus data fields to _rbf_
|
-- 2010-06-06 302 2.5 use sop/eop framing instead of soc+chaining
|
-- 2010-06-06 302 2.5 use sop/eop framing instead of soc+chaining
|
-- 2010-06-03 300 2.1.5 use FAWIDTH=5 for rri_serport
|
-- 2010-06-03 300 2.1.5 use FAWIDTH=5 for rri_serport
|
-- 2010-05-02 287 2.1.4 ren CE_XSEC->CE_INT,RP_STAT->RB_STAT,AP_LAM->RB_LAM
|
-- 2010-05-02 287 2.1.4 ren CE_XSEC->CE_INT,RP_STAT->RB_STAT,AP_LAM->RB_LAM
|
-- drop RP_IINT from interfaces; drop RTSFLUSH generic
|
-- drop RP_IINT from interfaces; drop RTSFLUSH generic
|
Line 37... |
Line 45... |
-- 2007-09-09 81 1.0 Initial version
|
-- 2007-09-09 81 1.0 Initial version
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
|
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
|
use ieee.std_logic_arith.all;
|
|
|
use work.slvtypes.all;
|
use work.slvtypes.all;
|
|
use work.rblib.all;
|
|
|
|
package rlinklib is
|
|
|
|
constant c_rlink_cpref : slv4 := "1000"; -- default comma prefix
|
|
constant c_rlink_ncomm : positive := 4; -- number commas (sop,eop,nak,attn)
|
|
|
package rrilib is
|
constant c_rlink_dat_idle : slv9 := "100000000";
|
|
constant c_rlink_dat_sop : slv9 := "100000001";
|
|
constant c_rlink_dat_eop : slv9 := "100000010";
|
|
constant c_rlink_dat_nak : slv9 := "100000011";
|
|
constant c_rlink_dat_attn : slv9 := "100000100";
|
|
|
|
constant c_rlink_cmd_rreg : slv3 := "000";
|
|
constant c_rlink_cmd_rblk : slv3 := "001";
|
|
constant c_rlink_cmd_wreg : slv3 := "010";
|
|
constant c_rlink_cmd_wblk : slv3 := "011";
|
|
constant c_rlink_cmd_stat : slv3 := "100";
|
|
constant c_rlink_cmd_attn : slv3 := "101";
|
|
constant c_rlink_cmd_init : slv3 := "110";
|
|
|
|
constant c_rlink_iint_rbf_anena: integer := 15; -- anena flag
|
|
constant c_rlink_iint_rbf_itoena: integer := 14; -- itoena flag
|
|
subtype c_rlink_iint_rbf_itoval is integer range 7 downto 0; -- command code
|
|
|
|
subtype c_rlink_cmd_rbf_seq is integer range 7 downto 3; -- sequence number
|
|
subtype c_rlink_cmd_rbf_code is integer range 2 downto 0; -- command code
|
|
|
|
subtype c_rlink_stat_rbf_stat is integer range 7 downto 5; -- ext status bits
|
|
constant c_rlink_stat_rbf_attn: integer := 4; -- attention flags set
|
|
constant c_rlink_stat_rbf_cerr: integer := 3; -- command error
|
|
constant c_rlink_stat_rbf_derr: integer := 2; -- data error
|
|
constant c_rlink_stat_rbf_rbnak: integer := 1; -- rbus no ack or timeout
|
|
constant c_rlink_stat_rbf_rberr: integer := 0; -- rbus err bit set
|
|
|
|
type rl_moni_type is record -- rlink_core monitor port
|
|
eop : slbit; -- eop send in last cycle
|
|
attn : slbit; -- attn send in last cycle
|
|
lamp : slbit; -- attn (lam) pending
|
|
end record rl_moni_type;
|
|
|
constant c_rri_dat_idle : slv9 := "100000000";
|
constant rl_moni_init : rl_moni_type :=
|
constant c_rri_dat_sop : slv9 := "100000001";
|
('0','0','0'); -- eop,attn,lamp
|
constant c_rri_dat_eop : slv9 := "100000010";
|
|
constant c_rri_dat_nak : slv9 := "100000011";
|
|
constant c_rri_dat_attn : slv9 := "100000100";
|
|
|
|
constant c_rri_cmd_rreg : slv3 := "000";
|
|
constant c_rri_cmd_rblk : slv3 := "001";
|
|
constant c_rri_cmd_wreg : slv3 := "010";
|
|
constant c_rri_cmd_wblk : slv3 := "011";
|
|
constant c_rri_cmd_stat : slv3 := "100";
|
|
constant c_rri_cmd_attn : slv3 := "101";
|
|
constant c_rri_cmd_init : slv3 := "110";
|
|
|
|
constant c_rri_iint_rbf_anena: integer := 15; -- anena flag
|
|
constant c_rri_iint_rbf_itoena: integer := 14; -- itoena flag
|
|
subtype c_rri_iint_rbf_itoval is integer range 7 downto 0; -- command code
|
|
|
|
subtype c_rri_cmd_rbf_seq is integer range 7 downto 3; -- sequence number
|
|
subtype c_rri_cmd_rbf_code is integer range 2 downto 0; -- command code
|
|
|
|
subtype c_rri_stat_rbf_stat is integer range 7 downto 5; -- ext status bits
|
|
constant c_rri_stat_rbf_attn: integer := 4; -- attention flags set
|
|
constant c_rri_stat_rbf_ccrc: integer := 3; -- command crc error
|
|
constant c_rri_stat_rbf_dcrc: integer := 2; -- data crc error
|
|
constant c_rri_stat_rbf_ioto: integer := 1; -- i/o time out
|
|
constant c_rri_stat_rbf_ioerr: integer := 0; -- i/o error
|
|
|
|
type rb_mreq_type is record -- rribus - master request
|
|
req : slbit; -- request
|
|
we : slbit; -- write enable
|
|
init : slbit; -- init
|
|
addr : slv8; -- address
|
|
din : slv16; -- data (input to slave)
|
|
end record rb_mreq_type;
|
|
|
|
constant rb_mreq_init : rb_mreq_type :=
|
|
('0','0','0', -- req, we, init
|
|
(others=>'0'), -- addr
|
|
(others=>'0')); -- din
|
|
|
|
type rb_sres_type is record -- rribus - slave response
|
|
ack : slbit; -- acknowledge
|
|
busy : slbit; -- busy
|
|
err : slbit; -- error
|
|
dout : slv16; -- data (output from slave)
|
|
end record rb_sres_type;
|
|
|
|
constant rb_sres_init : rb_sres_type :=
|
|
('0','0','0', -- ack, busy, err
|
|
(others=>'0')); -- dout
|
|
|
|
component rri_core is -- rri, core interface
|
component rlink_core is -- rlink core with 9bit iface
|
generic (
|
generic (
|
ATOWIDTH : positive := 5; -- access timeout counter width
|
ATOWIDTH : positive := 5; -- access timeout counter width
|
ITOWIDTH : positive := 6); -- idle timeout counter width
|
ITOWIDTH : positive := 6); -- idle timeout counter width
|
port (
|
port (
|
CLK : in slbit; -- clock
|
CLK : in slbit; -- clock
|
CE_INT : in slbit := '0'; -- rri ito time unit clock enable
|
CE_INT : in slbit := '0'; -- rlink ito time unit clock enable
|
RESET : in slbit; -- reset
|
RESET : in slbit; -- reset
|
CP_DI : in slv9; -- comm port: data in
|
RL_DI : in slv9; -- rlink 9b: data in
|
CP_ENA : in slbit; -- comm port: data enable
|
RL_ENA : in slbit; -- rlink 9b: data enable
|
CP_BUSY : out slbit; -- comm port: data busy
|
RL_BUSY : out slbit; -- rlink 9b: data busy
|
CP_DO : out slv9; -- comm port: data out
|
RL_DO : out slv9; -- rlink 9b: data out
|
CP_VAL : out slbit; -- comm port: data valid
|
RL_VAL : out slbit; -- rlink 9b: data valid
|
CP_HOLD : in slbit; -- comm port: data hold
|
RL_HOLD : in slbit; -- rlink 9b: data hold
|
CP_FLUSH : out slbit; -- comm port: data flush
|
RL_MONI : out rl_moni_type; -- rlink: monitor port
|
RB_MREQ : out rb_mreq_type; -- rbus: request
|
RB_MREQ : out rb_mreq_type; -- rbus: request
|
RB_SRES : in rb_sres_type; -- rbus: response
|
RB_SRES : in rb_sres_type; -- rbus: response
|
RB_LAM : in slv16; -- rbus: look at me
|
RB_LAM : in slv16; -- rbus: look at me
|
RB_STAT : in slv3 -- rbus: status flags
|
RB_STAT : in slv3 -- rbus: status flags
|
);
|
);
|
end component;
|
end component;
|
|
|
component rricp_aif is -- rri comm port, abstract interface
|
component rlink_aif is -- rlink, abstract interface
|
port (
|
port (
|
CLK : in slbit; -- clock
|
CLK : in slbit; -- clock
|
CE_INT : in slbit := '0'; -- rri ito time unit clock enable
|
CE_INT : in slbit := '0'; -- rlink ito time unit clock enable
|
RESET : in slbit :='0'; -- reset
|
RESET : in slbit :='0'; -- reset
|
CP_DI : in slv9; -- comm port: data in
|
RL_DI : in slv9; -- rlink 9b: data in
|
CP_ENA : in slbit; -- comm port: data enable
|
RL_ENA : in slbit; -- rlink 9b: data enable
|
CP_BUSY : out slbit; -- comm port: data busy
|
RL_BUSY : out slbit; -- rlink 9b: data busy
|
CP_DO : out slv9; -- comm port: data out
|
RL_DO : out slv9; -- rlink 9b: data out
|
CP_VAL : out slbit; -- comm port: data valid
|
RL_VAL : out slbit; -- rlink 9b: data valid
|
CP_HOLD : in slbit := '0' -- comm port: data hold
|
RL_HOLD : in slbit := '0' -- rlink 9b: data hold
|
);
|
);
|
end component;
|
end component;
|
|
|
component rrirp_aif is -- rri reg port, abstract interface
|
component rlink_rlb2rl is -- rlink 8 bit(rlb) to 9 bit(rl) adapter
|
|
generic (
|
|
CPREF : slv4 := c_rlink_cpref; -- comma prefix
|
|
IFAWIDTH : natural := 5; -- input fifo address width (0=none)
|
|
OFAWIDTH : natural := 5); -- output fifo address width (0=none)
|
port (
|
port (
|
CLK : in slbit; -- clock
|
CLK : in slbit; -- clock
|
RESET : in slbit := '0'; -- reset
|
RESET : in slbit; -- reset
|
RB_MREQ : in rb_mreq_type; -- rbus: request
|
RLB_DI : in slv8; -- rlink 8b: data in
|
RB_SRES : out rb_sres_type; -- rbus: response
|
RLB_ENA : in slbit; -- rlink 8b: data enable
|
RB_LAM : out slv16; -- rbus: look at me
|
RLB_BUSY : out slbit; -- rlink 8b: data busy
|
RB_STAT : out slv3 -- rbus: status flags
|
RLB_DO : out slv8; -- rlink 8b: data out
|
|
RLB_VAL : out slbit; -- rlink 8b: data valid
|
|
RLB_HOLD : in slbit; -- rlink 8b: data hold
|
|
IFIFO_SIZE : out slv4; -- input fifo size (4 msb's)
|
|
OFIFO_SIZE : out slv4; -- output fifo fill (4 msb's)
|
|
RL_DI : out slv9; -- rlink 9b: data in
|
|
RL_ENA : out slbit; -- rlink 9b: data enable
|
|
RL_BUSY : in slbit; -- rlink 9b: data busy
|
|
RL_DO : in slv9; -- rlink 9b: data out
|
|
RL_VAL : in slbit; -- rlink 9b: data valid
|
|
RL_HOLD : out slbit -- rlink 9b: data hold
|
|
);
|
|
end component;
|
|
|
|
-- this definition logically belongs into the 'for test benches' section'
|
|
-- must be here because it is needed as generic default in rlink_base
|
|
-- simbus sb_cntl field usage for rlink
|
|
constant sbcntl_sbf_rlmon : integer := 15;
|
|
|
|
component rlink_base is -- rlink base: core+rl2rlb+rlmon+rbmon
|
|
-- with buffered 8bit interface
|
|
generic (
|
|
ATOWIDTH : positive := 5; -- access timeout counter width
|
|
ITOWIDTH : positive := 6; -- idle timeout counter width
|
|
CPREF : slv4 := c_rlink_cpref; -- comma prefix
|
|
IFAWIDTH : natural := 5; -- input fifo address width (0=none)
|
|
OFAWIDTH : natural := 5; -- output fifo address width (0=none)
|
|
ENAPIN_RLMON : integer := sbcntl_sbf_rlmon; -- SB_CNTL for rlmon (-1=none)
|
|
ENAPIN_RBMON : integer := sbcntl_sbf_rbmon); -- SB_CNTL for rbmon (-1=none)
|
|
port (
|
|
CLK : in slbit; -- clock
|
|
CE_INT : in slbit := '0'; -- rlink ito time unit clock enable
|
|
RESET : in slbit; -- reset
|
|
RLB_DI : in slv8; -- rlink 8b: data in
|
|
RLB_ENA : in slbit; -- rlink 8b: data enable
|
|
RLB_BUSY : out slbit; -- rlink 8b: data busy
|
|
RLB_DO : out slv8; -- rlink 8b: data out
|
|
RLB_VAL : out slbit; -- rlink 8b: data valid
|
|
RLB_HOLD : in slbit; -- rlink 8b: data hold
|
|
IFIFO_SIZE : out slv4; -- input fifo size (4 msb's)
|
|
OFIFO_SIZE : out slv4; -- output fifo fill (4 msb's)
|
|
RL_MONI : out rl_moni_type; -- rlink: monitor port
|
|
RB_MREQ : out rb_mreq_type; -- rbus: request
|
|
RB_SRES : in rb_sres_type; -- rbus: response
|
|
RB_LAM : in slv16; -- rbus: look at me
|
|
RB_STAT : in slv3 -- rbus: status flags
|
);
|
);
|
end component;
|
end component;
|
|
|
component rri_serport is -- rri serport adapter
|
type rl_ser_moni_type is record -- rlink_serport monitor port
|
|
rxerr : slbit; -- rx err
|
|
rxdrop : slbit; -- rx drop
|
|
rxact : slbit; -- rx active
|
|
txact : slbit; -- tx active
|
|
abact : slbit; -- ab active
|
|
abdone : slbit; -- ab done
|
|
clkdiv : slv16; -- clock divider
|
|
end record rl_ser_moni_type;
|
|
|
|
constant rl_ser_moni_init : rl_ser_moni_type :=
|
|
('0','0', -- rxerr,rxdrop
|
|
'0','0', -- rxact,txact
|
|
'0','0', -- abact,abdone
|
|
(others=>'0')); -- clkdiv
|
|
|
|
constant c_rlink_serport_rbf_fena: integer := 12; --
|
|
subtype c_rlink_serport_rbf_fwidth is integer range 11 downto 9; --
|
|
subtype c_rlink_serport_rbf_fdelay is integer range 8 downto 6; --
|
|
subtype c_rlink_serport_rbf_rtsoff is integer range 5 downto 3; --
|
|
subtype c_rlink_serport_rbf_rtson is integer range 2 downto 0; --
|
|
|
|
component rlink_serport is -- rlink serport adapter
|
generic (
|
generic (
|
CPREF : slv4 := "1000"; -- comma prefix
|
RB_ADDR : slv8 := conv_std_logic_vector(2#11111110#,8);
|
FAWIDTH : positive := 5; -- rx fifo address port width
|
|
CDWIDTH : positive := 13; -- clk divider width
|
CDWIDTH : positive := 13; -- clk divider width
|
CDINIT : natural := 15); -- clk divider initial/reset setting
|
CDINIT : natural := 15); -- clk divider initial/reset setting
|
port (
|
port (
|
CLK : in slbit; -- clock
|
CLK : in slbit; -- clock
|
CE_USEC : in slbit; -- 1 usec clock enable
|
CE_USEC : in slbit; -- 1 usec clock enable
|
Line 156... |
Line 224... |
RESET : in slbit; -- reset
|
RESET : in slbit; -- reset
|
RXSD : in slbit; -- receive serial data (board view)
|
RXSD : in slbit; -- receive serial data (board view)
|
TXSD : out slbit; -- transmit serial data (board view)
|
TXSD : out slbit; -- transmit serial data (board view)
|
CTS_N : in slbit := '0'; -- clear to send (act.low, board view)
|
CTS_N : in slbit := '0'; -- clear to send (act.low, board view)
|
RTS_N : out slbit; -- request to send (act.low, board view)
|
RTS_N : out slbit; -- request to send (act.low, board view)
|
CP_DI : out slv9; -- comm port: data in
|
RLB_DI : out slv8; -- rlink 8b: data in
|
CP_ENA : out slbit; -- comm port: data enable
|
RLB_ENA : out slbit; -- rlink 8b: data enable
|
CP_BUSY : in slbit; -- comm port: data busy
|
RLB_BUSY : in slbit; -- rlink 8b: data busy
|
CP_DO : in slv9; -- comm port: data out
|
RLB_DO : in slv8; -- rlink 8b: data out
|
CP_VAL : in slbit; -- comm port: data valid
|
RLB_VAL : in slbit; -- rlink 8b: data valid
|
CP_HOLD : out slbit; -- comm port: data hold
|
RLB_HOLD : out slbit; -- rlink 8b: data hold
|
CP_FLUSH : in slbit := '0' -- comm port: data flush
|
RB_MREQ : in rb_mreq_type; -- rbus: request (for inits only)
|
|
IFIFO_SIZE : in slv4; -- rlink_rlb2rb: input fifo size
|
|
RL_MONI : in rl_moni_type; -- rlink_core: monitor port
|
|
RL_SER_MONI : out rl_ser_moni_type -- rlink_serport: monitor port
|
);
|
);
|
end component;
|
end component;
|
|
|
component rri_core_serport is -- rri, core+serport with cpmon+rbmon
|
component rlink_base_serport is -- rlink base+serport combo
|
generic (
|
generic (
|
ATOWIDTH : positive := 5; -- access timeout counter width
|
ATOWIDTH : positive := 5; -- access timeout counter width
|
ITOWIDTH : positive := 6; -- idle timeout counter width
|
ITOWIDTH : positive := 6; -- idle timeout counter width
|
FAWIDTH : positive := 5; -- rx fifo address port width
|
CPREF : slv4 := c_rlink_cpref; -- comma prefix
|
|
IFAWIDTH : natural := 5; -- input fifo address width (0=none)
|
|
OFAWIDTH : natural := 5; -- output fifo address width (0=none)
|
|
ENAPIN_RLMON : integer := sbcntl_sbf_rlmon; -- SB_CNTL for rlmon (-1=none)
|
|
ENAPIN_RBMON : integer := sbcntl_sbf_rbmon; -- SB_CNTL for rbmon (-1=none)
|
|
RB_ADDR : slv8 := conv_std_logic_vector(2#11111110#,8);
|
CDWIDTH : positive := 13; -- clk divider width
|
CDWIDTH : positive := 13; -- clk divider width
|
CDINIT : natural := 15); -- clk divider initial/reset setting
|
CDINIT : natural := 15); -- clk divider initial/reset setting
|
port (
|
port (
|
CLK : in slbit; -- clock
|
CLK : in slbit; -- clock
|
CE_USEC : in slbit; -- 1 usec clock enable
|
CE_USEC : in slbit; -- 1 usec clock enable
|
Line 186... |
Line 262... |
CTS_N : in slbit := '0'; -- clear to send (act.low, board view)
|
CTS_N : in slbit := '0'; -- clear to send (act.low, board view)
|
RTS_N : out slbit; -- request to send (act.low, board view)
|
RTS_N : out slbit; -- request to send (act.low, board view)
|
RB_MREQ : out rb_mreq_type; -- rbus: request
|
RB_MREQ : out rb_mreq_type; -- rbus: request
|
RB_SRES : in rb_sres_type; -- rbus: response
|
RB_SRES : in rb_sres_type; -- rbus: response
|
RB_LAM : in slv16; -- rbus: look at me
|
RB_LAM : in slv16; -- rbus: look at me
|
RB_STAT : in slv3 -- rbus: status flags
|
RB_STAT : in slv3; -- rbus: status flags
|
|
RL_MONI : out rl_moni_type; -- rlink_core: monitor port
|
|
RL_SER_MONI : out rl_ser_moni_type -- rlink_serport: monitor port
|
);
|
);
|
end component;
|
end component;
|
|
|
component rb_sres_or_2 is -- rribus result or, 2 input
|
--
|
port (
|
-- components for use in test benches (not synthesizable)
|
RB_SRES_1 : in rb_sres_type; -- rb_sres input 1
|
--
|
RB_SRES_2 : in rb_sres_type := rb_sres_init; -- rb_sres input 2
|
|
RB_SRES_OR : out rb_sres_type -- rb_sres or'ed output
|
|
);
|
|
end component;
|
|
component rb_sres_or_3 is -- rribus result or, 3 input
|
|
port (
|
|
RB_SRES_1 : in rb_sres_type; -- rb_sres input 1
|
|
RB_SRES_2 : in rb_sres_type := rb_sres_init; -- rb_sres input 2
|
|
RB_SRES_3 : in rb_sres_type := rb_sres_init; -- rb_sres input 3
|
|
RB_SRES_OR : out rb_sres_type -- rb_sres or'ed output
|
|
);
|
|
end component;
|
|
component rb_sres_or_4 is -- rribus result or, 4 input
|
|
port (
|
|
RB_SRES_1 : in rb_sres_type; -- rb_sres input 1
|
|
RB_SRES_2 : in rb_sres_type := rb_sres_init; -- rb_sres input 2
|
|
RB_SRES_3 : in rb_sres_type := rb_sres_init; -- rb_sres input 3
|
|
RB_SRES_4 : in rb_sres_type := rb_sres_init; -- rb_sres input 4
|
|
RB_SRES_OR : out rb_sres_type -- rb_sres or'ed output
|
|
);
|
|
end component;
|
|
|
|
component rri_wreg_rw_3 is -- rri: wide register r/w 3 bit select
|
component rlink_mon is -- rlink monitor
|
generic (
|
generic (
|
DWIDTH : positive := 16);
|
DWIDTH : positive := 9); -- data port width (8 or 9)
|
port (
|
port (
|
CLK : in slbit; -- clock
|
CLK : in slbit; -- clock
|
RESET : in slbit; -- reset
|
CLK_CYCLE : in slv31 := (others=>'0'); -- clock cycle number
|
FADDR : slv3; -- field address
|
ENA : in slbit := '1'; -- enable monitor output
|
SEL : slbit; -- select
|
RL_DI : in slv(DWIDTH-1 downto 0); -- rlink: data in
|
DATA : out slv(DWIDTH-1 downto 0); -- data
|
RL_ENA : in slbit; -- rlink: data enable
|
RB_MREQ : in rb_mreq_type; -- rribus request
|
RL_BUSY : in slbit; -- rlink: data busy
|
RB_SRES : out rb_sres_type -- rribus response
|
RL_DO : in slv(DWIDTH-1 downto 0); -- rlink: data out
|
|
RL_VAL : in slbit; -- rlink: data valid
|
|
RL_HOLD : in slbit -- rlink: data hold
|
);
|
);
|
end component;
|
end component;
|
|
|
component rri_wreg_w_3 is -- rri: wide register w-o 3 bit select
|
component rlink_mon_sb is -- simbus wrap for rlink monitor
|
generic (
|
generic (
|
DWIDTH : positive := 16);
|
DWIDTH : positive := 9; -- data port width (8 or 9)
|
|
ENAPIN : integer := sbcntl_sbf_rlmon); -- SB_CNTL signal to use for enable
|
port (
|
port (
|
CLK : in slbit; -- clock
|
CLK : in slbit; -- clock
|
RESET : in slbit; -- reset
|
RL_DI : in slv(DWIDTH-1 downto 0); -- rlink: data in
|
FADDR : slv3; -- field address
|
RL_ENA : in slbit; -- rlink: data enable
|
SEL : slbit; -- select
|
RL_BUSY : in slbit; -- rlink: data busy
|
DATA : out slv(DWIDTH-1 downto 0); -- data
|
RL_DO : in slv(DWIDTH-1 downto 0); -- rlink: data out
|
RB_MREQ : in rb_mreq_type; -- rribus request
|
RL_VAL : in slbit; -- rlink: data valid
|
RB_SRES : out rb_sres_type -- rribus response
|
RL_HOLD : in slbit -- rlink: data hold
|
);
|
|
end component;
|
|
|
|
component rri_wreg_r_3 is -- rri: wide register r-o 3 bit select
|
|
generic (
|
|
DWIDTH : positive := 16);
|
|
port (
|
|
FADDR : slv3; -- field address
|
|
SEL : slbit; -- select
|
|
DATA : in slv(DWIDTH-1 downto 0); -- data
|
|
RB_SRES : out rb_sres_type -- rribus response
|
|
);
|
);
|
end component;
|
end component;
|
|
|
end rrilib;
|
end rlinklib;
|
|
|
No newline at end of file
|
No newline at end of file
|