⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xspled.vhd

📁 the vhdl model of usb. it is very helpful.
💻 VHD
字号:
--------------------------------------------------------------------------------
-- Copyright (c) 2000 by Trenz Electronic.
-- Duenner Kirchweg 77, 32257 Buende, Germany, www.trenz-electronic.de
--     
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--     
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--     
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
--------------------------------------------------------------------------------
-- Project:      Full-Speed USB 1.1 Function Controller
-- File:         xspLED.vhd
-- Description:  XSP-010 board, 7-Segment LED register.
-- Version:      FB, 2000jun05
--------------------------------------------------------------------------------

library IEEE;
use IEEE.STD_LOGIC_1164.all;

entity xspLED is
	port(
		A :   in  STD_LOGIC_VECTOR(15 downto 0); -- address bus
		WR :  in  STD_LOGIC;                     -- write enable
		DWR : in  STD_LOGIC_VECTOR(7 downto 0);  -- data bus
		LED : out STD_LOGIC_VECTOR(6 downto 0)   -- LED segments
		);
end xspLED;

--------------------------------------------------------------------------------
architecture BHV of xspLED is
begin
	
	process(A, DWR, WR)
	begin
		if A(15 downto 12)= "1111" then
			if rising_edge(WR) then
				LED<= DWR(6 downto 0);
			end if;
		end if;
	end process;
	
end BHV;

--------------------------------------------------------------------------------
-- end of file

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -