左移寄存器vhdl_(完整word版)移位寄存器VHDL

这篇博客介绍了如何使用VHDL设计一个具备左移、右移、同步置数和同步清零功能的移位寄存器。通过QuartusII软件进行编译和波形仿真,以验证设计的正确性。实验内容包括熟悉VHDL语言,编写程序,并最终完成实验报告。
摘要由CSDN通过智能技术生成

VHDL

移位寄存器的设计

1

、实验内容

(

1

)设计一个移位寄存器

(

2

)根据

VHDL

语言描述输入法编译和波形仿真。

2

、实验要求

(1)

熟悉

VHDL

语言描述输入法

(2)

设计一个移位寄存器的

VHDL

程序,具有

左、右移位,同步置数、同步清零等功

(3)

QuartusII

软件编译和波形仿真

(4)

把自己认为好的实验结果写成实验报告。

(要计成绩)

3

、实验步骤

程序:

library ieee;

use ieee.std_logic_1164.all;

use ieee.std_logic_arith.all;

use ieee.std_logic_unsigned.all;

entity yw is

port(data:in std_logic_vector(5 downto 0);

left_da,right_da,reset,clk:in std_logic;

mode :in std_logic_vector(1 downto 0);

qout :buffer std_logic_vector(5 downto 0));

end yw;

architecture behave of yw is

begin

process

begin

wait until rising_edge(clk);

if(reset='1')then

qout<="000000";

else

case mode is

when"00"=>qout<=qout;

when"01"=>qout<=right_da&qout(5 downto 1);

when"10"=>qout<=qout(4 downto 0)&left_da;

when"11"=>qout<=data;

when others=>null;

end case;

end if;

end process;

end behave

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值