2012年10月11日 星期四
P5-16 移位 Shift << , >> 範例:除8 適合於DE2-70實驗板
// p5-16 Divided by 8 shift right operator ">>
// for DE2=70 experiment board"
module Divided8 (SW, LEDR, LEDG);
input [17:0] SW; // toggle switches
output [17:0] LEDR; // red LEDS
output [7:0] LEDG; // green LEDs
//set original program input , output
wire [7:0]div; //Dividend
wire [7:0]quot; //Quotient , Remainder
assign div=SW[7:0];
parameter sh_bit=3;
assign quot = div >> sh_bit;
assign LEDG[7:0]=quot;
endmodule
/*original program
module div_8(div,quot);
input [7:0]div;
output[7:0]quot;
parameter sh_bit=3;
assign quot = din >> sh_bit;
endmodule
*/
訂閱:
張貼留言 (Atom)
MQTT 協定與 Modbus 通訊的遠端監控與控制系統架構
MQTT 協定與 Modbus 通訊的遠端監控與控制系統架構 這張圖片展示了一個 結合 MQTT 協定與 Modbus 通訊的遠端監控與控制系統架構 (主要透過 Node-RED 進行資料整合)。 系統包含三個核心部分,其運作功能說明如下: 1. ESP32 終端設備(硬體控制層...
-
數位IC設計入門-Verilog combinational logic 8 to 1 Multiplexer 多工器 Behavioral Modeling (& Test Bench) //數位IC設計入門-Verilog combinationa...
-
python pip 不是内部或外部命令 -- 解決方法 要安裝 Pyqt5 1. 首先,開啟命令提示字元。 2. 輸入 pip3 install pyqt5 好像不能執行 ! ! 錯誤顯示 : ‘ pip3 ’ 不是內部或外部命令、可執行的程式或批...
-
Line 發報機 Python TKinter (CONFIG_LINE Message API_2.py) import serial import serial.tools.list_ports import tkinter as tk from tkinter import...
沒有留言:
張貼留言