HDLBits - Vector4

2025. 1. 4. 17:31·HDLBits/Verilog

Concatenation Operator

{} 연결 연산자를 사용해서 더 큰 Vector를 형성 할 수 있다.
{num{vector}} 반복되는 Vector는 앞에 숫자를 붙여서 축약 할 수 있다.

예를 들어
{2{a,b,c}}, {3'd5, {2{3'd6}}}와 같이 사용 가능하다.

문제는 8bit 짜리 in을 부호자리를 늘려서 32bit로 표현 하라는 문제

module top_module (
    input [7:0] in,
    output [31:0] out );

    assign out = {{24{in[7]}}, in[7:0]};

endmodule
저작자표시 비영리 변경금지 (새창열림)
'HDLBits/Verilog' 카테고리의 다른 글
  • HDLBits - GitHub 주소
  • HDLBits - Vector5
  • HDLBits - Vectorr
  • HDLBits - Gates4
Zi_Yoon
Zi_Yoon
머리 속에 정리하는 곳 <전자공학>
  • Zi_Yoon
    ZY_repo
    Zi_Yoon
  • 전체
    오늘
    어제
    • 분류 전체보기 (70)
      • HDLBits (25)
        • Verilog (19)
        • Circuits (4)
        • Verification (0)
      • IDEC 교육 (1)
        • Embedded C (13)
        • Verilog HDL (8)
      • Hardware (8)
        • RISC-V Project (1)
        • Computer Architecture (0)
        • AMBA (2)
        • FPGA (0)
        • 논문 읽기 (1)
        • ETC. (4)
      • 42서울 (13)
        • 리눅스 (12)
        • 네트워크 (1)
      • 생각 (1)
      • 취업 (1)
  • 블로그 메뉴

    • 홈
    • 태그
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    ARM
    Keil
    verilator
    ssh
    centos
    embedded
    비대칭 키
    AMBA
    AppArmor
    IDEC
    c
    세션 키
    RISC-V
    verilog
    AXI4
    APT
    QUARTUS
    research rabbit
    hdlbits
    fpga
    보안 쉘
    pointer
    debian
    vm
    axi
    lsblk
    signal trap
    fucntion
    bit-wise and
    charater
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.1
Zi_Yoon
HDLBits - Vector4
상단으로

티스토리툴바