Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

bidirectional bus problem

Status
Not open for further replies.

fatihtir1

Newbie level 2
Joined
Apr 4, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
Hello all,

Could you please tell me the difference between two lines below:

sram_da <= write_data when (sram_read='0') else "ZZZZZZZZZZZZZZZZ";
sram_da <= "ZZZZZZZZZZZZZZZZ" (sram_read='1) else write_data;

I used the first line for reading from sram, but simulation didn't showed expected result (i have an sram vhld model also). After long hours of examination and trying, when i replaced it with second line, it was ok. But I can't understand why the first line is wrong.

I appreciate your help.

Regards.
 

The lines should give the same synthesis result, but they can behave differently in simulation if "sram_read" has a value like 'L', 'H', 'X', 'U', '-'.
 

Hello all,

Could you please tell me the difference between two lines below:

sram_da <= write_data when (sram_read='0') else "ZZZZZZZZZZZZZZZZ";
sram_da <= "ZZZZZZZZZZZZZZZZ" (sram_read='1) else write_data;

I used the first line for reading from sram, but simulation didn't showed expected result (i have an sram vhld model also). After long hours of examination and trying, when i replaced it with second line, it was ok. But I can't understand why the first line is wrong.

I appreciate your help.

Regards.
Most likely the signal 'sram_read' is an active high true signal from the perspective of whatever is driving 'sram_da'. Assuming the code you posted is from something that is trying to drive the SRAM, then your signal naming convention is kind of bonkers. Your design would want to drive the SRAM data bus when it is writing, not when it is not reading. I would write it like this...
sram_da <= write_data when (sram_write='1') else "ZZZZZZZZZZZZZZZZ";

Kevin Jennings
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top