FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > Verilog

Verilog comp.lang.verilog newsgroup / usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-29-2004, 02:39 PM
mw3382
Guest
 
Posts: n/a
Default please tell me why this inout port assignment isnt working!!!

Hi,

I am implementing a simple cache memory system with an inout data bus
(cpu_data), and I have this line of code

assign cpu_data = (mem_to_cpu) ? temp : ((cache_to_cpu) ? cachemem[index]:
16'b1010101010101010);

The simulation shows that mem_to_cpu is always 0 and cache_to_cpu changes
from 0 to 1, but cpu_data remains at xxxxxxxxxxxxxxxx throughout the
simulation. I am not assigning any other values to cpu_data. Any ideas?

Thanks,
Mike


Reply With Quote
  #2 (permalink)  
Old 09-29-2004, 03:05 PM
Mike Lewis
Guest
 
Posts: n/a
Default Re: please tell me why this inout port assignment isnt working!!!

Well you don't really have an inout bus ... cpu_data is always
driving and never goes tri-state.

cpu_data can be "x" if there is something else driving the data bus.
Do you have another entity in your simulation that can drive cpu_data?

Mike

"mw3382" <[email protected]> wrote in message
news:[email protected] lkaboutprogramming.com...
> Hi,
>
> I am implementing a simple cache memory system with an inout data bus
> (cpu_data), and I have this line of code
>
> assign cpu_data = (mem_to_cpu) ? temp : ((cache_to_cpu) ? cachemem[index]:
> 16'b1010101010101010);
>
> The simulation shows that mem_to_cpu is always 0 and cache_to_cpu changes
> from 0 to 1, but cpu_data remains at xxxxxxxxxxxxxxxx throughout the
> simulation. I am not assigning any other values to cpu_data. Any ideas?
>
> Thanks,
> Mike
>
>



Reply With Quote
  #3 (permalink)  
Old 09-29-2004, 04:08 PM
mw3382
Guest
 
Posts: n/a
Default Re: please tell me why this inout port assignment isnt working!!

sorry that was wrong it was 16'bzzzzzzzzzzzzzzzz not 16'b1010101010101010

Reply With Quote
  #4 (permalink)  
Old 09-29-2004, 05:29 PM
mw3382
Guest
 
Posts: n/a
Default Re: please tell me why this inout port assignment isnt working!!

ok i have found the problem - i was not tristating the test module end of
the bus! i am almost certain i have set all bus connections to
16'bzzzzzzzzzzzzzzzz, but what i am seeing now on the simulation is the
value 000000000000000z. is this a common error?

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
inout port in verilog Joy Chatterjee Verilog 2 06-16-2004 02:21 AM
Procedural assignment DW Verilog 4 06-08-2004 10:42 PM
Re: Working of continous assignment statement Steven Sharp Verilog 0 04-01-2004 12:39 AM
how to detect inout contention black Verilog 2 10-29-2003 11:24 PM
inout ports? CupOfWater Verilog 2 10-10-2003 09:32 AM


All times are GMT +1. The time now is 09:08 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved