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)
ESP32 微控制器 採集的環境數據,經由 MQTT 協定 轉換並寫入工業標準的 Modbus 暫存器 中
一個典型的 IoT(物聯網)與工業自動化系統整合(SCADA/機台連線) 的架構圖。它透過 Node-RED 作為核心資料網關,將前端 ESP32 微控制器 採集的環境數據,經由 MQTT 協定 轉換並寫入工業標準的 Modbus 暫存器 中。 1. 各模組功能拆解...
-
Line 發報機 Python TKinter (CONFIG_LINE Message API_2.py) import serial import serial.tools.list_ports import tkinter as tk from tkinter import...
-
python pip 不是内部或外部命令 -- 解決方法 要安裝 Pyqt5 1. 首先,開啟命令提示字元。 2. 輸入 pip3 install pyqt5 好像不能執行 ! ! 錯誤顯示 : ‘ pip3 ’ 不是內部或外部命令、可執行的程式或批...
-
課程講義 下載 11/20 1) PPT 下載 + 程式下載 http://www.mediafire.com/file/cru4py7e8pptfda/106%E5%8B%A4%E7%9B%8A2-1.rar 11/27 2) PPT 下載...
沒有留言:
張貼留言