Altera_Forum
Honored Contributor
8 years agoProblem with resolving signals in vhdl
Hey guys!
I'm dealing with an annoying vhdl problem. I've made a couple of blocks that communicate with each other and now I'm writing a testbench for them. One of the modules is a ram module and I want to initialize it with some data for the rest of the blocks to work on. I am getting the problem that the memory address has mutiple sources. (Actually I am getting an error in modelsim: "Nonresolved signal 'addr_1' has multiple sources.") This makes sense since I am trying to interact with the port from the testbench (I am reading from a file and storing it in the memory) and afterwards I will operate on the data from another module. I thought this would work since I am assigning the port at different points in time, but thats not the case. Whats the general way of dealing with this problem, w/o changing your whole code around.After all its a testbench, it should be able to operate with minimum interference. I thought of two ideas, neither of which sound very appealing: 1) Renaming the respective signals from the two sources, and assigning them in a third process. Which gets very ugly, very quick. 2) The addr_1 is actually an integer (and is therefore not resolved??, compared to other std_logic signals that I do the same with, and dont give problems). So I could try to write a resolution function for the integers, but im not sure its going to work as i am trying to actually resolve the sources and not the values from those sources. (The std_logic signals might also give problems that way). Here is the signal im talking about: signal addr_1: integer range 0 to addr_width; How do I go about this? Thanks for your time!