OpenCores
URL https://opencores.org/ocsvn/mips_enhanced/mips_enhanced/trunk

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [gaisler/] [can/] [canmux.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
-----------------------------------------------------------------------------
2
-- Entity:  pcifbackend
3
-- File:    pcifbackend.vhd
4
-- Author:  Nils-Johan Wessman - Gaisler Research
5
-- Description: CAN Multiplexer (to connect two CAN buses to one CAN core) 
6
------------------------------------------------------------------------------
7
library ieee;
8
use ieee.std_logic_1164.all;
9
 
10
entity canmux is
11
   port(
12
      sel      : in std_logic;
13
      canrx    : out std_logic;
14
      cantx    : in std_logic;
15
      canrxv   : in std_logic_vector(0 to 1);
16
      cantxv   : out std_logic_vector(0 to 1)
17
       );
18
end;
19
 
20
architecture rtl of canmux is
21
begin
22
 
23
comb : process(sel, cantx, canrxv)
24
begin
25
   if sel = '1' then
26
      canrx <= canrxv(1);
27
      cantxv(0) <= '1';
28
      cantxv(1) <= cantx;
29
   else
30
      canrx <= canrxv(0);
31
      cantxv(0) <= cantx;
32
      cantxv(1) <= '1';
33
   end if;
34
end process;
35
end;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.