Giter Site home page Giter Site logo

Comments (4)

jakubcabal avatar jakubcabal commented on July 23, 2024

Hi, that configuration should work. But without your source code, I can't tell where the error is.

from spi-fpga.

imuguruza avatar imuguruza commented on July 23, 2024

Hi, I have finally managed it, for the record, I have commented out the next processes:

And I have used the procedude SPI_MASTER to generate data transmission, this line.

I want to add two things:

  • I find confusing how the SPI and mdi / mdo are used. I believe they are swapped. For example, here. If it's MOSI the assigned data should be MDO right?

  • Running the simulation, I still see that the line MISO generates signal, and I don't understand why is happening that... The TB I am running is the following: https://gist.github.com/imuguruza/9d347bcb641aa9bab0856d5de4ba7e0f

The SPI slave is wrapped around a top.vhd where some additional stuff is done with the received data from SPI.

Running the TB, I see the following waveforms:

image

Any idea why miso is driving a signal, when I am not using it in the TB?

from spi-fpga.

jakubcabal avatar jakubcabal commented on July 23, 2024

Hi, to your questions:

  • SMM_MDI signal of the procedure SPI_MASTER is used to receive (therefore DI) user data into the SPI_MASTER model (procedure). The SPI_MASTER then sends this data via the MOSI signal. But it probably deserves a clearer name.
  • SPI_SLAVE has a common shift register for both received and sent data. Therefore, if the user does not write data to SPI_SLAVE to send to SPI_MASTER, SPI_SLAVE will start sending (via MISO) the last received data. This should be eliminated by constant setting of some port SPI_SLAVE: DIN_VLD => '1', DIN => (others => '0').

from spi-fpga.

imuguruza avatar imuguruza commented on July 23, 2024

SMM_MDI signal of the procedure SPI_MASTER is used to receive (therefore DI) user data into the SPI_MASTER model (procedure). The SPI_MASTER then sends this data via the MOSI signal. But it probably deserves a clearer name.

I see

SPI_SLAVE has a common shift register for both received and sent data. Therefore, if the user does not write data to SPI_SLAVE to send to SPI_MASTER, SPI_SLAVE will start sending (via MISO) the last received data. This should be eliminated by constant setting of some port SPI_SLAVE: DIN_VLD => '1', DIN => (others => '0').

Ok, I have tried it out and now I see nothing in MISO.
Thanks!

from spi-fpga.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.