인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

박준서's profile image
박준서

asked

Design Self-Study Tastebi's Practical Verilog HDL Season 1 (From Clock to Internal Memory)

[HDL Chapter 10] Understanding Counters Properly to Improve Design Ability (Theory) - (If you understand counters properly, you will be better than a mediocre design beginner!)

MUX 설계 중 wire와 reg에 대해 질문드립니다.

Written on

·

346

1

안녕하세요. 베릴로그로 MUX를 설계하다가 모듈과 테스트벤치에서 wire와 reg에 대한 궁금증이 있어 질문드립니다.

 

구글링을 하면서 코드를 구현했습니다. 그런데 제가 이해한 것이 맞다면 모듈에서는 input을 wire로 선언하고 output을 reg로 선언했는데, 테스트벤치에서는 반대로 input을 reg로 구현하고 output을 wire로 선언해야 하는 것 같습니다.

 

만일 이것이 맞다면 모듈과 테스트벤치에서 wire와 reg의 선언에 대해 입출력 포트가 반대로 되는지 질문드리고 싶습니다.

 

아래에 코드 사진 첨부하였습니다.

 

4x1 MUX 모듈

 

테스트벤치

verilog-hdlfpga임베디드

Answer 1

0

aifpga님의 프로필 이미지
aifpga
Instructor

안녕하세요 :)

이전에 받았던 질문이고요.

https://aifpga.tistory.com/entry/testbench-%EC%9D%98-input-output-reg-wire

위 링크 참고 부탁드려요.

즐공하세요 :)

박준서's profile image
박준서

asked

Ask a question