EEVblog Electronics Community Forum
A Free & Open Forum For Electronics Enthusiasts & Professionals
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
This topic
This board
Entire forum
Google
Bing
Home
Help
Search
About us
Links
Login
Register
EEVblog Electronics Community Forum
»
Electronics
»
FPGA
»
Verilog Assign Logic to Wire Array?
« previous
next »
Print
Search
Pages: [
1
]
Go Down
Author
Topic: Verilog Assign Logic to Wire Array? (Read 2251 times)
0 Members and 1 Guest are viewing this topic.
hal9001
Regular Contributor
Posts: 122
Country:
Verilog Assign Logic to Wire Array?
«
on:
December 23, 2023, 07:54:47 am »
I have 3 wire arrays like this
wire [3:0] a;
wire [3:0] b;
wire [3:0] c;
I want c[0]=a[0] & b[0], c[1]=a[1] & b[1], c[2]=a[2] & b[2], c[3]=a[3] & b[3]. Instead of assigning each wire manually is there a one line way to assign the logic?
Cheers!
Logged
ataradov
Super Contributor
Posts: 11780
Country:
Re: Verilog Assign Logic to Wire Array?
«
Reply #1 on:
December 23, 2023, 08:05:49 am »
c = a & b; would do that.
Logged
Alex
The following users thanked this post:
hal9001
hal9001
Regular Contributor
Posts: 122
Country:
Re: Verilog Assign Logic to Wire Array?
«
Reply #2 on:
December 23, 2023, 08:37:55 am »
Quote from: ataradov on December 23, 2023, 08:05:49 am
c = a & b; would do that.
Thanks
Logged
Print
Search
Pages: [
1
]
Go Up
« previous
next »
Share me
Smf
EEVblog Electronics Community Forum
»
Electronics
»
FPGA
»
Verilog Assign Logic to Wire Array?
There was an error while thanking
Thanking...
EEVblog Main Site
EEVblog on Youtube
EEVblog on Twitter
EEVblog on Facebook
EEVblog on Odysee