Re: [問題] 請問這樣的觀念對嗎(verilog HDL)?
※ 引述《Vampirespit (Vampirespit)》之銘言:
: 假如說我1個大模組
: 裡面包了5個正緣觸發的小模組
: (也就是說有五個模組各負責其功能 但都是正緣觸發)
: 意示圖↓
: ─────────────────────────────
: 大模組( 輸入時脈clk )
: {
: 小模組1(正緣觸發) outputI=inputI+1
: 小模組2(正緣觸發) outputII=inputII-2
: 小模組3(正緣觸發) outputIII=inputIII*3
: 小模組4(正緣觸發) outputIV=inputIV/4
: 小模組5(正緣觸發) outputV=inputV+5
: }
: ─────────────────────────────
: 想法一.↑上圖大模組內的接線已省略 功能則是從小模組1接至小模組5
: 完成 outputV= { [(inputI+1-2)*3]/4]+5 } 的方程式
: 請問這樣是不是這個大模組已經有pipeline的功能了呢?
: (也就是說 outputV= { [(inputI+1-2)*3]/4]+5 } 要5個clk後才會出來?)
: 想法二.
: 還是說當正緣觸發時
: 那5個小模組也會 "一起" 被正緣觸發而動作?(i.e.沒有pipeline?)
: (也就是說 outputV= { [ [ (inputI+1-2)*3] /4] +5 } 1個正緣觸發就出來了?)
: 可以請你們幫我澄清一下觀念嗎?
: 謝謝你們的收看 ╭(╴"╴)╮
這個嘛!五個output各自獨立作自己的運算,一個正緣後,你會得到五個值...
說真的,不太想給你正確答案,你應該從書中獲得觀念...
舉個例子,你自己舉一反三吧...
....宣告自己想辦法
assign c = a + b ;
assign e = register_1 + d ;
always (posedge clk or negedge n_rst) begin
if(!n_rst)begin
register_1 <= 0 ;
end
else begin
register_1 <= c ;
end
end
always (posedge clk or negedge n_rst) begin
if(!n_rst)begin
register_2 <= 0 ;
end
else begin
register_2 <= e ;
end
end
這樣就是插了兩排register在output處
有些人喜歡插在input,看習慣...
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.114.15.152
推
08/25 22:25, , 1F
08/25 22:25, 1F
→
08/25 22:26, , 2F
08/25 22:26, 2F
推
08/26 09:48, , 3F
08/26 09:48, 3F
→
08/26 09:50, , 4F
08/26 09:50, 4F
→
08/26 09:50, , 5F
08/26 09:50, 5F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 3 篇):