# Forum: FPGA, VHDL & Verilog DAC interface on spartan 3E

Rate this post
 0 ▲ useful ▼ not useful
Here I am trying to make DAC work on boar of FPGA spartan 3E.I write
code as per manual but it don't give desired output.I attached the code
here. Can anyone tell me where the problem is?

Rate this post
 0 ▲ useful ▼ not useful
Look for a working SPI-Core and use it.

Check the spi protocol with the datasheet of your SPI-DAC. Use
simulation and compare the waveform of the simulator with that in your
datasheet

Does your spi-clk toggle? I guess not. And also check the direction of
the port.

Rate this post
 0 ▲ useful ▼ not useful
Thank you for your response.
my spi_sck is working proper. And I also check for SPI but I don't find
any problem with it.I am beginner. if possible,can you explain in detail
?

Rate this post
 0 ▲ useful ▼ not useful
Krishna wrote:
> Thank you for your response.
> my spi_sck is working proper. And I also check for SPI but I don't find
> any problem with it.I am beginner. if possible,can you explain in detail
> ?

OK, I missed the toggling by "XOR 1'. See it seems to toggle. But i
assume its not using a IOB-Flipflop. Have you set any constraint?
Otherwise is likely that the sck takes some ns longer to propagate to
the pin. Try post place&route simulation or use a scop and check spi set
and hold times in respect to sck.

https://forums.xilinx.com/t5/Embedded-Development-Tools/Post-Place-and-Route-simulation-with-MicroBlaze/td-p/356313

Rate this post
 0 ▲ useful ▼ not useful
You are right it is about constrain, I try to solve it but not working.
it is gives below warnings. can you tell me how to remove that warnings?

WARNING:Xst:1293 - FF/Latch <dacsend_8> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacsend_7> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacsend_6> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacsend_2> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacsend_1> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacsend_0> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_32> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_31> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_30> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_29> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_28> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_27> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_26> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_25> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_24> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_23> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_13> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_12> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_11> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_7> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_6> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_5> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_4> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_3> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_2> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_1> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_0> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacsend_8> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacsend_7> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacsend_6> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacsend_2> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacsend_1> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacsend_0> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_32> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_31> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_30> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_29> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_28> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_27> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_26> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_25> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_24> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_23> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_13> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_12> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_11> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_7> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_6> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_5> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_4> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_3> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_2> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_1> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1293 - FF/Latch <dacdata_0> has a constant value of 0 in
block <DAC>. This FF/Latch will be trimmed during the optimization
process.

Rate this post
 0 ▲ useful ▼ not useful
The warnings are just telling you that your signal "dacsend" is always
set to all zeros. You never put any other value in there so you have a
signal stuck at one value.

This is usually not what you want and that is why you are getting a
warning.

• $formula (LaTeX syntax)$