[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Verilog Help

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 10
Thread images: 1

File: verilog-31-638.jpg (54KB, 638x479px) Image search: [Google]
verilog-31-638.jpg
54KB, 638x479px
I have been bashing my head against the wall for like 5 hours trying to get this simple Verilog circuit to work.

I know this is low chance, but would anyone be able to help me?

It is pretty simple, 4 inputs into 4 AND gates and then the 4 AND gets input into an OR gate.

I get f = 0 no matter what input I give a, b, x, y.
module exp3veri(x, y, a, b, f);
input x;
input y;
input a;
input b;
output f;

wire nXAB = (~x & a & b);
wire YAnB = (y & a & ~b);
wire YnAB = (y & ~a & b);
wire XnAnB = (x & ~a & ~b);

assign f = (nXAB | YAnB | YnAB | XnAnB);


endmodule
>>
module exp3veri(x, y, a, b, f);
input x, y, a, b;
output f;

wire nXAB;
wire YAnB;
wire YnAB;
wire XnAnB;

assign nXAB = (~x & a & b);
assign YAnB = (y & a & ~b);
assign YnAB = (y & ~a & b);
assign XnAnB = (x & ~a & ~b);

assign f = (nXAB | YAnB | YnAB | XnAnB);
endmodule


If this doesn't work, your logic is incorrect.
>>
>>54866780
wow you are right. i guess my logic is wrong. fuck i just been wasting like 5 hours cuase of this. fuck me in the ass.
>>
>>54866942
Should've used VHDL
>>
>>54866780
>>54866942

nope. i am just an idiot who doesn't understand how Xilinx works. I was not actually running the simulation. just going off the test bench where the value of f doesn't change.

holy fuck fuck me.
>>
>>54866967
It takes awhile to get used to the weird tools in the FPGA world. No worries. At least you figured it out.
>>
>>54866989
thanks for the support


thanks for the help if there is more than one person here. i appreciate it.
>>
>tfw 3 weeks working on a real-time image thresholder
>finally finished

Feels good desu
>>
>>54866212
You know you are suppose to describe the logic on a higher level than basic bitwise arithmetic with things like verilog/vhdl right?
>>
>>54866212
>I have been bashing my head against the wall for like 5 hours trying to get this simple Verilog circuit to work.
http://danluu.com/why-hardware-development-is-hard/
Thread posts: 10
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.