본문 바로가기
HW Design/1. Verilog HDL Basic

[Using Continuous Assignment] 1. 연속 할당 in 베릴로그

by 한PU 2024. 1. 10.
728x90
반응형
  • assign 키워드 사용

continuous Assignment in Verilog

  • verilog net types 에서 data를 구동시키기 위해 사용
  • 즉, combinational logic circuits 모델링에 사용
  • continuous aasignment 사용에 대한 2가지 방법
    • explicit continuous assignment
      • 보편적인 방법
    • implicit continuous assignment
      • net declaration assignment 로도 부름

Explicit Continuous Assignment

  • assign 키워드 일반적인 구문
    assign <variable> = <value>;
  • <variable>
    • 데이터를 할당할 신호의 이름
    • net type 변수에만 사용 가능
  • <value>
    • 고정 값 or 연산자를 이용한 표현
    • variable, net types 표현 사용 가능
      assign a = b;

Net Declaration Assignment

  • 연속 할당을 신호 선언시 배치
  • 코드의 양을 줄일 수 있음.
  • = 기호를 사용하여 신호에 값을 선언할 때 값을 할당
    <type> <variable> = <value>;
    
    wire a = b;
728x90
반응형