???????????ÀF??????¾T???¾T?§Ô?????????---? ???????????ÀF??????¾T???¾T?§Ô?????????---?
¦Ë??? > ? > >

Verilog HDL??--?

?¦ÌVerilog HDL??--??VerilogHDL??¡¤??VerilogHDL?¡¤???¡¤VerilogHDL??VerilogHDL????????????¡¤??...

? ?2013-11-3 17:29:06 ?

Verilog HDL??--?

Verilog HDL??¡¤??Verilog HDL?¡¤???¡¤Verilog HDL??Verilog HDL????????????¡¤?????¡¤Verilog HDL??Verilog????¡¤???§»?????5?

  • ??system??????????
  • ?algorithm????????
  • RTLRegister Transfer Level???¦Ä§»???
  • ?gate-level???????
  • ?switch-level????????

 

??¡¤??Verilog HDL??Verilog HDL?ûy????????ûy¨À§»?????¡¤§»?????ý‚?¡¤??Verilog HDL?????????¦Í?ÁÙ?????¡¤??

 

Verilog HDL?????????????RTL????1?

  • ??§Ý?§Ö??
  • ???????????
  • ???????
  • ?if-elsecase??
  • ?????task?
  • ???¦Ì???function
  • ????¦Ë
  • Verilog HDL???????????????1?
    • ????primitive
    • ???¡¤???
    • ?MOS???????

 

Verilog HDL?????????Verilog HDL§µ????????????????§Ó????Ú…?¦¶??????

 

Verilog HDL??????C??if?case?C§Ö?????C??????Verilog HDL???Verilog HDL?§»????????????¡¤�ŸVerilog HDL§Ö???

 

Verilog HDL

Verilog HDL?§ÙVerilog HDL?

 

1?

module  adder count,sum,a,b,cin ;  //???

     input 2:0 a,b;                        //??

     input  cin;

     output  count;

     output 2:0 sum;

     assign {count,sum} = a + b + cin;     //???

endmodule

 

????adder¦Ë??ab?¦Ëcin?sum?¦Ëcount§á?Verilog HDL?moduleendmodule?

 

2?

module  compare equal,a,b ;    //???

         output  equal;                //?equal

         input 1:0 a,b;             //?ab

         assign  equal=a==b10; //ab ?,?1,?0

endmodule

 

????compare??ab§Ò??ab?equal??????§µ“/*........*/”“//.........”???????????????

 

3???

module  trist2out,in,enable;     //???

     output  out;                      //??

     input  in, enable;

     bufif1  mybufout,in,enable;  //??bufif1

endmodule

 

??trist2???Verilog?????bufif1?Êé?

 

4??

module  trist1out,in,enable;    //???

     output  out;                      //??

     input  in, enable;

     mytri  tri_instout,in,enable;//?mytri?úE??tri_inst

endmodule

     module  mytriout,in,enable; //???

     output  out;                          //??

     input  in, enable;

     assign  out = enable? in : 'bz;   //??

endmodule

 

??????§Õ?î•?trist1?mytri??tri_inst?trist1??î•?mytri????î•

???

  • Verilog HDL?ûy??????moduleendmodule???????????§Ó????,????¡¤????§³????,????ŽÈ?
  • ???§Ø??,?,??????
  • Verilog HDL§Õ?,?§á§Õ,???§Õ§³
  • endmodule,??§Ù??
  • “/*.....*/”“//.......”Verilog HDL¦Ê¦Â??????¨¹??????,???????

 

??

??I/OI/O?????‰^

1I/O

???????¡ê

 

Module    ??1?2?3?4, …;

 

2I/O?

I/O???¡ê

 

?input  ?1?2…?i  //i?

?output ?1?2…?j      //j?

 

I/O??§Õ????¡ê

 

module  module_nameinput port1,input port2,…,output port1,output port2…

 

3??

????§Û?wirereg?

 

reg width-1 : 0 R1R2 …

wire width-1 : 0 W1W2 …

 

4?

?????¿ù?3??§Ó?

1“assign”?

assign a = b & c;

???????§Õ?“assign”???¨À§Ö????

 

2??

and and_inst q, a, b ;

????¡¤???¡ê?????????and??and_inst??ab?q?????¦¸????and?

 

3“always”î•

always @posedge clk or posedge clr begin        //???

   ifclr  q <= 0;                              //

   else  ifen q <= d;                          //???

   end

“assign”??????“always”?????“always”???D

 

“always”¨²???§à“if...else”??º–??§Õ“always”ï…??????????????¡¤???Verilog??????§»???§»??

 

3??“assign”???“always”î•3????§Ö???3§Õ?Verilog?????????????3???§Ö????

 

?“always”???????§Ö?“always”§Ö?“?”???§Ö???“always”?????§Ö?????§Ö?

 

?“always”???????“if…else… if”??§µÊé??¦Ê‰^elseif???§µ????????“always”??�Þ§Õ??§³

  • 1
  • 2
  • ??

?????

??

  • 0731-85579057 0731-85569651
  • ??????

??

??

?? ?¦Ã ?? ? ?? ?§µ? ?? ? ? ? ?? ?§µ?? ? ? ? ?§µ? ?? ???? ?? ?? ??? ??? ?? ? ?? ?? ? ?? ??ÀF
? ??? ¾T? ???§µ ÀF??§µ ?? ??§µ ÀF?§µ ??§µ ??? ?? ?ÀF?º”?????????????ÀF?ÀF???ÀF?ÀF??ÀFÀF?Ö½¾Tõô?¾T????? >>
-?????§µ
?? ?? ??
ÀF??§µ ¾T??§µ ?§Ô??§µ ?§Ô?? ??? ??? ?? ¾T?? ??? ? ??? ?? ?? ?? ?? ???§µ ÀF? ? ÀF?§µ ÀF??§µ ¾T??§µ ?§Ô??§µ ?§Ô?? ??? ??? ?? ¾T?? ??? ? ??? ?? ?? ?? ?? ???§µ ÀF? ? ÀF?§µ ÀF??§µ ¾T??§µ ?§Ô??§µ ?§Ô?? ??? ??? ?? ¾T?? ??? ? ??? ?? ?? ?? ?? ???§µ ÀF? ? ÀF?§µ ÀF??§µ ¾T??§µ ?§Ô??§µ ?§Ô?? ??? ??? ?? ¾T?? ??? ? ??? ?? ?? ?? ?? ???§µ ÀF? ? ÀF?§µ