w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
cmoda7_sram_dummy.vhd
Go to the documentation of this file.
1-- $Id: cmoda7_sram_dummy.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: cmoda7_sram_dummy - syn
7-- Description: cmoda7 target (base; serport loopback, sram protect)
8--
9-- Dependencies: -
10-- To test: tb_cmoda7_sram
11-- Target Devices: generic
12-- Tool versions: viv 2016.4; ghdl 0.34
13--
14-- Revision History:
15-- Date Rev Version Comment
16-- 2017-06-04 906 1.0 Initial version
17------------------------------------------------------------------------------
18
19library ieee;
20use ieee.std_logic_1164.all;
21
22use work.slvtypes.all;
23
24entity cmoda7_sram_dummy is -- CmodA7 dummy (base+sram)
25 -- implements cmoda7_sram_aif
26 port (
27 I_CLK12 : in slbit; -- 12 MHz board clock
28 I_RXD : in slbit; -- receive data (board view)
29 O_TXD : out slbit; -- transmit data (board view)
30 I_BTN : in slv2; -- c7 buttons
31 O_LED : out slv2; -- c7 leds
32 O_RGBLED0_N : out slv3; -- c7 rgb-led 0 (act.low)
33 O_MEM_CE_N : out slbit; -- sram: chip enable (act.low)
34 O_MEM_WE_N : out slbit; -- sram: write enable (act.low)
35 O_MEM_OE_N : out slbit; -- sram: output enable (act.low)
36 O_MEM_ADDR : out slv19; -- sram: address lines
37 IO_MEM_DATA : inout slv8 -- sram: data lines
38 );
40
41architecture syn of cmoda7_sram_dummy is
42
43begin
44
45 O_TXD <= I_RXD; -- loop back serport
46
47 O_LED <= I_BTN; -- mirror BTN on LED
48
49 O_RGBLED0_N(0) <= not I_BTN(0); -- mirror BTN on RGBLED 0 -> red
50 O_RGBLED0_N(1) <= not I_BTN(1); -- 1 -> green
51 O_RGBLED0_N(2) <= not (I_BTN(0) and I_BTN(1)); -- 0+1 -> white
52
53 O_MEM_CE_N <= '1';
54 O_MEM_WE_N <= '1';
55 O_MEM_OE_N <= '1';
56 O_MEM_ADDR <= (others=>'0');
57 IO_MEM_DATA <= (others=>'Z');
58
59end syn;
std_logic_vector( 18 downto 0) slv19
Definition: slvtypes.vhd:52
std_logic_vector( 2 downto 0) slv3
Definition: slvtypes.vhd:35
std_logic slbit
Definition: slvtypes.vhd:30
std_logic_vector( 7 downto 0) slv8
Definition: slvtypes.vhd:40
std_logic_vector( 1 downto 0) slv2
Definition: slvtypes.vhd:34