2021年4月20日 星期二

HBLbits_Verilog Basic_Vector0

 HBLbits_Verilog Basic_Vector0

wire [99:0] my_vector; // Declare a 100-element vector assign out = my_vector[10]; // Part-select one bit out of the vector


module top_module(
input [2:0] vec,
output [2:0] outv,
output o2,
output o1,
output o0
);

assign outv = vec; // This is ok too: assign {o2, o1, o0} = vec;
assign o0 = vec[0];
assign o1 = vec[1];
assign o2 = vec[2];

endmodule

沒有留言:

張貼留言

DISCORD ESP32

DISCORD  ESP32        準備工作:取得 Discord Webhook URL 開啟 Discord 並進入你的伺服器。 進入頻道設定(齒輪圖示) > 整合 (Integrations) > Webhook 。 點擊「建立 Webhook」,設定...