為方便評估同學學習成效, 請在這個訊息下回POST, 留下自己的部落格網址....
回覆意見 comment 格式如下:學號, 名字(後兩字), 網址
例如: S030001, 浩雲, http:///yourname.blogspot.com
謝謝合作........
Monday, September 22, 2014
Thursday, March 20, 2014
1位元多工器 邏輯閘測試
/////////////////
//行為模式
/////////////////
module top;
integer ia,ib,is;
reg a,b,s
wire out;
mux_behavioral mux1(out,a,b,s);
initial
begin
for (ia=0; ia<=1; ia = ia+1)
begin
a = ia;
for (ib=0; ib<=1; ib = ib + 1)
begin
b = ib;
for (is=0; is<=1; is = is + 1)
begin
s = is;
#1 $display("a=%d b=%d s=%d out=%d",a,b,s,out);
end
end
end
end
endmodule
module mux_behavioral(OUT, A, B, SEL);
output OUT;
input A,B,SEL;
wire A,B,SEL;
reg OUT;
always @(A or B or SEL)
OUT = (A & SEL)|(B & ~SEL );
endmodule
//行為模式
/////////////////
module top;
integer ia,ib,is;
reg a,b,s
wire out;
mux_behavioral mux1(out,a,b,s);
initial
begin
for (ia=0; ia<=1; ia = ia+1)
begin
a = ia;
for (ib=0; ib<=1; ib = ib + 1)
begin
b = ib;
for (is=0; is<=1; is = is + 1)
begin
s = is;
#1 $display("a=%d b=%d s=%d out=%d",a,b,s,out);
end
end
end
end
endmodule
module mux_behavioral(OUT, A, B, SEL);
output OUT;
input A,B,SEL;
wire A,B,SEL;
reg OUT;
always @(A or B or SEL)
OUT = (A & SEL)|(B & ~SEL );
endmodule
/////////////////
//結構模式
/////////////////
//結構模式
/////////////////
module top
integer ia,ib,is;
reg a,b,s;
wire out;
mux_structural mux1(out,a,b,s);
initial
begin
for (ia=0; ia<=1; ia = ia+1)
begin
a = ia;
for (ib=0; ib<=1; ib = ib + 1)
begin
b = ib;
for (is=0; is<=1; is = is + 1)
begin
s = is;
#1 $display("a=%d b=%d s=%d out=%d",a,b,s,out);
end
end
end
end
endmodule
module mux_structural(OUT, A, B, SEL);
output OUT;
input A,B,SEL;
not I5 (sel_n, SEL);
and I6 (sel_a, A, SEL);
and I7 (sel_b, sel_n, B);
or I4 (OUT, sel_a, sel_b);
endmodule
Monday, June 17, 2013
請102-下學期(103年3月)修課同學在這個訊息下, 留下自己的部落格網址....
為方便評估同學學習成效, 請在這個訊息下回POST, 留下自己的部落格網址....
回覆意見 comment 格式如下:學號, 名字(後兩字), 網址
例如: S950001, 曉明, http:///yourname.blogspot.com
謝謝合作........
回覆意見 comment 格式如下:學號, 名字(後兩字), 網址
例如: S950001, 曉明, http:///yourname.blogspot.com
謝謝合作........
Thursday, May 16, 2013
Thursday, April 25, 2013
一位元加法器行為模式設計與測試
module test_adder1;
reg a,b;
reg carry_in ;
wire sum;
wire carry_out;
adder1_behavorial A1(carry_out, sum, a, b, carry_in);
initial
begin
carry_in = 0; a = 0; b = 0;
# 100 if ( carry_in != 0 | sum !== 0)
$display(" 0+0+0=00 sum is WRONG!");
else
$display(" 0+0+0=00 sum is RIGHT!");
carry_in = 0; a = 0; b = 1;
# 100 if ( carry_in != 0 | sum !== 1)
$display(" 0+0+1=01 sum is WRONG!");
else
$display(" 0+0+1=01 sum is RIGHT!");
carry_in = 1; a = 1; b = 1;
# 100 if ( carry_in != 1 | sum !== 1)
$display(" 1+1+1=11 sum is WRONG!");
else
$display(" 1+1+1=11 sum is RIGHT!");
$finish;
end
endmodule
module adder1_behavorial (carry_out, sum, a, b, carry_in);
input a, b, carry_in;
output carry_out, sum;
assign sum = (~a&b&~carry_in)|(~carry_in&a&~b)|(a&b&carry_in);
assign carry_out = a&carry_in|a&b|b&carry_in;
endmodule
reg a,b;
reg carry_in ;
wire sum;
wire carry_out;
adder1_behavorial A1(carry_out, sum, a, b, carry_in);
initial
begin
carry_in = 0; a = 0; b = 0;
# 100 if ( carry_in != 0 | sum !== 0)
$display(" 0+0+0=00 sum is WRONG!");
else
$display(" 0+0+0=00 sum is RIGHT!");
carry_in = 0; a = 0; b = 1;
# 100 if ( carry_in != 0 | sum !== 1)
$display(" 0+0+1=01 sum is WRONG!");
else
$display(" 0+0+1=01 sum is RIGHT!");
carry_in = 1; a = 1; b = 1;
# 100 if ( carry_in != 1 | sum !== 1)
$display(" 1+1+1=11 sum is WRONG!");
else
$display(" 1+1+1=11 sum is RIGHT!");
$finish;
end
endmodule
module adder1_behavorial (carry_out, sum, a, b, carry_in);
input a, b, carry_in;
output carry_out, sum;
assign sum = (~a&b&~carry_in)|(~carry_in&a&~b)|(a&b&carry_in);
assign carry_out = a&carry_in|a&b|b&carry_in;
endmodule
Thursday, March 07, 2013
AND 邏輯閘測試
/////////////////
//行為模式
/////////////////
module top
integer ia,ib;
reg a,b;
wire out;
and_behavioral and1(out,a,b);
initial
begin
for (ia=0; ia<=1; ia = ia+1)
begin
a = ia;
for (ib=0; ib<=1; ib = ib + 1)
begin
b = ib;
#1 $display("a=%d b=%d out=%d",a,b,out);
end
end
end
endmodule
module and_behavioral(out,a,b);
input a,b;
output out;
wire a,b;
reg out;
always @(a or b)
out = a & b;
endmodule
/////////////////
//結構模式
/////////////////
module top;
wire A, B, OUT
system_clock #400 clock1(A);
system_clock #200 clock2(B);
and a1(OUT, A, B);
endmodule
module system_clock(clk);
parameter PERIOD=100;
output clk;
reg clk;
initial clk=0;
always
begin
#(PERIOD/2) clk=~clk;
end
always@(posedge clk)
if($time>1000)$stop;
endmodule
101-下__從C語言轉Verilog設計到FPGA晶片實現
Compile Your C code into Verilog
C-to-Verilog is a free and open sourced on-line C to Verilog compiler. You can copy-and-paste your existing C code and our on-line compiler will synthesize it into optimized verilog.
For additional information on how to use our website to create FPGA designs.
http://www.c-to-verilog.com
請101-下學期(102年3月)修課同學在這個訊息下, 留下自己的部落格網址....
為方便評估同學學習成效, 請在這個訊息下回POST, 留下自己的部落格網址....
回覆意見 comment 格式如下:
學號, 名字(後兩字), 網址例如:
S950001, XX, http:///????.blogspot.tw
謝謝合作.......
還沒有部落格帳號的同學, 請到 http://www.blogger.com 以 google (gmail) 帳號申請即可.
Thursday, November 24, 2011
大葉大學校務發展架構

工學院教育目標
一、因材施教,培養具創新與實作能力之專業工程人才;
二、蘊育學生具人文素養、領導能力及團隊精神之人格特質;
三、兼顧理論與實務之教學,強化課程與新興科技之整合;
四、積極推動國際化,提升學生外語能力及國際視野。

工學院學生核心能力
一、運用數學、科學及工程知識之能力。
二、設計與執行實驗,以及分析與解釋數據之能力。
三、執行工程實務所需技術、技巧及使用工具之能力。
四、設計工程系統、元件或製程之能力。
五、計劃管理、有效溝通與團隊合作的能力。
六、發掘、分析及處理問題之能力。
七、認識時事議題,瞭解工程技術對環境、社會及全球的影響,並培養持續學習的習慣與能力。
八、理解專業倫理及社會責任。
大葉大學課程地圖
http://www.dyu.edu.tw/~aa2400/chinese_web/c-academic-affairs_02_03_5.htm
大葉大學電機系課程地圖
http://ee.dyu.edu.tw/index.php?num=5&f=

工學院教育目標
一、因材施教,培養具創新與實作能力之專業工程人才;
二、蘊育學生具人文素養、領導能力及團隊精神之人格特質;
三、兼顧理論與實務之教學,強化課程與新興科技之整合;
四、積極推動國際化,提升學生外語能力及國際視野。

工學院學生核心能力
一、運用數學、科學及工程知識之能力。
二、設計與執行實驗,以及分析與解釋數據之能力。
三、執行工程實務所需技術、技巧及使用工具之能力。
四、設計工程系統、元件或製程之能力。
五、計劃管理、有效溝通與團隊合作的能力。
六、發掘、分析及處理問題之能力。
七、認識時事議題,瞭解工程技術對環境、社會及全球的影響,並培養持續學習的習慣與能力。
八、理解專業倫理及社會責任。
大葉大學課程地圖
http://www.dyu.edu.tw/~aa2400/chinese_web/c-academic-affairs_02_03_5.htm
大葉大學電機系課程地圖
http://ee.dyu.edu.tw/index.php?num=5&f=
Monday, November 07, 2011
Adder2 ~ 2位元加法器
module top;
reg [1:0] A, B;
reg Cin;
wire[1:0] Sum;
adder2 M2(Cout, Sum, A, B, Cin);
initial
begin
A=2'd1;
B=2'd1;
Cin=1'd1;
end
endmodule
module adder2(Cout, Sum, A, B, Cin);
output Cout;
output [1:0] Sum;
input [1:0] A, B;
input Cin;
adder1 I1 (C0, Sum[0], A[0], B[0], Cin);
adder1 I2 (Cout, Sum[1], A[1], B[1], C0);
endmodule
reg [1:0] A, B;
reg Cin;
wire[1:0] Sum;
adder2 M2(Cout, Sum, A, B, Cin);
initial
begin
A=2'd1;
B=2'd1;
Cin=1'd1;
end
endmodule
module adder2(Cout, Sum, A, B, Cin);
output Cout;
output [1:0] Sum;
input [1:0] A, B;
input Cin;
adder1 I1 (C0, Sum[0], A[0], B[0], Cin);
adder1 I2 (Cout, Sum[1], A[1], B[1], C0);
endmodule
Adder1 ~ 1位元加法器
module top;
system_clock #400 clock1(Cin);
system_clock #200 clock2(A);
system_clock #100 clock3(B);
adder1 M1(Cout, Sum, A, B, Cin);
endmodule
module adder1(Cout, Sum, A, B, Cin);
output Cout,Sum;
input A,B,Cin;
and I1 (AandB, A, B);
xor I2 (AxorB, A, B);
and I3 (And1, AxorB, Cin);
or I4 (Cout, AandB, And1);
xor I5 (Sum, AxorB, Cin);
endmodule
system_clock #400 clock1(Cin);
system_clock #200 clock2(A);
system_clock #100 clock3(B);
adder1 M1(Cout, Sum, A, B, Cin);
endmodule
module adder1(Cout, Sum, A, B, Cin);
output Cout,Sum;
input A,B,Cin;
and I1 (AandB, A, B);
xor I2 (AxorB, A, B);
and I3 (And1, AxorB, Cin);
or I4 (Cout, AandB, And1);
xor I5 (Sum, AxorB, Cin);
endmodule
Monday, October 24, 2011
Monday, October 17, 2011
範例: 多工器
module top;
system_clock #400 clock1(A);
system_clock #200 clock2(B);
system_clock #100 clock3(SEL);
mux M1(OUT, A, B, SEL);
endmodule
module mux(OUT, A, B, SEL);
output OUT;
input A,B,SEL;
not I5 (sel_n, SEL) ;
and I6 (sel_a, A, SEL);
and I7 (sel_b, sel_n, B);
or I4 (OUT, sel_a, sel_b);
endmodule
module system_clock(clk);
parameter PERIOD=100;
output clk;
reg clk;
initial clk=0;
always
begin
#(PERIOD/2) clk=~clk;
end
always@(posedge clk)
if($time>1000)$stop;
endmodule
Monday, September 19, 2011
請100-上學期(100年9月)修課同學在這個訊息下, 留下自己的部落格網址....
為方便評估同學學習成效, 請在這個訊息下回POST, 留下自己的部落格網址....
回覆意見 comment 格式如下:
學號, 名字(後兩字), 網址例如:
S950001, XX, http:///????.blogspot.com
謝謝合作.......
回覆意見 comment 格式如下:
學號, 名字(後兩字), 網址例如:
S950001, XX, http:///????.blogspot.com
謝謝合作.......
Monday, September 13, 2010
請99-上學期(99年9月)修課同學在這個訊息下, 留下自己的部落格網址....
為方便評估同學學習成效, 請在這個訊息下回POST, 留下自己的部落格網址....
回覆意見 comment 格式如下:
學號, 名字(後兩字), 網址例如:
S950001, XX, http:///????.blogspot.com
謝謝合作.......
回覆意見 comment 格式如下:
學號, 名字(後兩字), 網址例如:
S950001, XX, http:///????.blogspot.com
謝謝合作.......
Monday, October 19, 2009
Monday, October 05, 2009
Subscribe to:
Posts (Atom)