I am using DSP48E1 slice as a multiplier and it works fine. First I made a small design which has few modules inside, including a module which uses this slice and worked fine. Then I made a top level design where I joined many modules including the small design module, which uses this slice inside and when I tried to simulate the top level, I don't have output from the slice(It is just zero), all the inputs from the other module are perfectly getting to the input port of the slice but it gave a result of all zero. It still works with the small design module, I tried with first, alone. Anyone encountered such a problem?
Hard to see what is going on without having the code for the project, otherwise the best answer I can give you is: You must have an error in your code.
Post the code and then you might have a chance of getting a better answer.
Thank you ads-ee for the fast reply. But the code is hundreds of lines, not handy to post it. What do you think is a potential cause of it, if you get an idea of the problem?
Hahaha, that is funny. But If you have read my problem correctly, you have at least observed that, it is very unlikely to be of a coding mistake. As I mentioned, I don't have a problem of understanding and using the slice. The problem arise when I used it in my top level. Thanks anyway.
The problem is usually the code. And the more low level you make the code (eg. instantiating individual slices) the more likely you are to make an error.
The error description sounds like a classic case of user input error. With no code, we cant even try and guess what the error is.
Hey TrickyDicky, Thanks! But as I mentioned I have checked the signals right to the input ports of the slice, they all have the correct signal value. I am pretty sure that it is not of a coding problem. Plus I am using the same vhd file that I have tested and working perfectly, when tested alone.
As ads-ee pointed out, the code is needed for an exact answer. However, there are some potential problems you may check:
- Is there clock on DSP48E1?
- Is DSP48E1 out of reset?
- Aren't you multiplying by 0?
- Are the signals connected to instance 18-bits? (it is common to connect 1-bit signal by mistake).
Also, you should simulate your code. If you check the DSP48E1 internally, you will surely find the problem (check B,D,A,OPMODE,CLK,RESET,MUL signals).
Thanks pbernardi, but now it is working. There was a reset signal on air, not connected to anything. And thanks for the potential problems list, I am sure it will be quite helpful for others.
I have checked the signals right to the input ports of the slice, they all have the correct signal value. I am pretty sure that it is not of a coding problem.
...like: Don't assume you did it right, when something isn't working. Assume you're doing it wrong and prove to yourself that you did it right. You could have saved us all a bunch of time by posting the code for the design.