w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
cmoda7_dummy.vhd
Go to the documentation of this file.
1-- $Id: cmoda7_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_dummy - syn
7-- Description: cmoda7 minimal target (base; serport loopback)
8--
9-- Dependencies: -
10-- To test: tb_cmoda7
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_dummy is -- CmodA7 dummy (base; loopback)
25 -- implements cmoda7_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 );
34end cmoda7_dummy;
35
36architecture syn of cmoda7_dummy is
37
38begin
39
40 O_TXD <= I_RXD; -- loop back serport
41
42 O_LED <= I_BTN; -- mirror BTN on LED
43
44 O_RGBLED0_N(0) <= not I_BTN(0); -- mirror BTN on RGBLED 0 -> red
45 O_RGBLED0_N(1) <= not I_BTN(1); -- 1 -> green
46 O_RGBLED0_N(2) <= not (I_BTN(0) and I_BTN(1)); -- 0+1 -> white
47
48end syn;
in I_BTN slv2
out O_RGBLED0_N slv3
out O_TXD slbit
in I_RXD slbit
out O_LED slv2
in I_CLK12 slbit
std_logic_vector( 2 downto 0) slv3
Definition: slvtypes.vhd:35
std_logic slbit
Definition: slvtypes.vhd:30
std_logic_vector( 1 downto 0) slv2
Definition: slvtypes.vhd:34