首页 > 其他分享 >Left/right rotator

Left/right rotator

时间:2024-04-11 15:24:50浏览次数:23  
标签:load begin right rotator input bit Left

Build a 100-bit left/right rotator, with synchronous load and left/right enable. A rotator shifts-in the shifted-out bit from the other end of the register, unlike a shifter that discards the shifted-out bit and shifts in a zero. If enabled, a rotator rotates the bits around and does not modify/discard them.

题目网站

 1 module top_module(
 2     input clk,
 3     input load,
 4     input [1:0] ena,
 5     input [99:0] data,
 6     output reg [99:0] q); 
 7 always @(posedge clk) begin
 8         if(load) begin
 9             q <= data;
10         end
11         else begin
12             case (ena)
13                 2'b01:q <= {q[0],q[99:1]};
14                 2'b10:q <= {q[98:0],q[99]};
15                 default:q <= q;
16             endcase
17         end
18     end
19 
20 endmodule

标签:load,begin,right,rotator,input,bit,Left
From: https://www.cnblogs.com/jzzg/p/18129297

相关文章

  • playwright-上下文管理器-xpath定位-页面切换
    fromplaywright.sync_apiimportsync_playwright#封装一个方法用于切换浏览器窗口页面defswitch_to_page(context,url):forpageincontext.pages:ifurl==page.url:#如果传进来的url等于列表中urlpage.bring_to_front()#对页面进行暂停......
  • 自动化测试工具playwright
    Playwright是由微软在2020年初开源的新一代自动化测试工具,其功能和Selenium、Pyppeteer等类似,都能驱动浏览器进行各种自动化操作。它不仅功能强大,而且对市面上的主流浏览器都提供了支持,其API功能简洁又强大。此外,Playwright是一个可以支持网页页面渲染的工具,加上其强大又简洁的......
  • playwright-元素定位(一)
    #同步模式fromplaywright.sync_apiimportsync_playwright#导入同步模块#创建一个Playwright的管理器对象withsync_playwright()asp:#等同于p=sync_playwright()#基于p创建一个浏览器对象(默认谷歌),slow_mo全局等待1sbro=p.chromium.launch(headless=Fal......
  • playwright-异步模式
    #异步模式importasynciofromplaywright.async_apiimportasync_playwright#导入异步模块asyncdefmain():#封装一个特殊函数#创建一个Playwright的管理器对象asyncwithasync_playwright()asp:#等同于p=sync_playwright()#基于p创建一个浏览器......
  • playwright-录制功能
    安装1、cmd中输入pipinstallplaywright2、安装完后接着输入playwrightinstall安装相关工具插件和浏览器驱动包#pycharm终端输入下方命令启动电脑浏览器进行录制#playwrightcodegen-omain.pyfromplaywright.sync_apiimportPlaywright,sync_playwright,expect......
  • playwright+Pytest+UI 自动化分成设计框架
    Auth:认证登录token机制BasePage:公共方法Common:ConfigLogsPageLocatorsPagesTestCasesTestDatas新建BasePage.py文件点击查看代码fromplaywright.sync_apiimportexpect,PagefromConfig.configimportConfigimportos,timeclassBasePage:def__init......
  • plawright过抖音手机号登录验证
    importhttpximportrandomimportasyncioimportddddocrfromPILimportImagefromioimportBytesIOfromloguruimportloggerfromplaywright.async_apiimportPage,Response,async_playwrightclassAwemeBrowser:def__init__(self,session:str,h......
  • playwright for net 对日期选择控件(My97DatePicker)的设置
     playwrightf对日期选择控件的设置,直接使用js脚本publicpartialclassMainForm:Form{IPlaywrightplaywright;IPagepage;publicMainForm(){InitializeComponent();}privateasyncvoidMainForm_Loa......
  • playwright 操作
    importtimeimportcsvfromplaywright.sync_apiimportPlaywright,sync_playwrightwithsync_playwright()asplaywright:browser=playwright.chromium.launch(headless=False)#打开一个浏览器会话context=browser.new_context()context.clear_......
  • 计算机专业的选择right?
    1.回顾你过去将近3年的学习经历当初你报考的时候,是真正喜欢计算机这个专业吗?你现在后悔选择了这个专业吗?你认为你现在最喜欢的领域是什么(可以是计算机的也可以是其它领域)?1.不是,主要因为好就业。2.不后悔3.计算机操作系统。总结你现在已经掌握的知识你都具备了那些专业知......