Giter Club home page Giter Club logo

beaglewire's People

Contributors

idcrook avatar osresearch avatar pmezydlo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beaglewire's Issues

bad behavior in echo in examples/ Makefile.beaglewire using pre-prepared image

Trying a BeagleWire today using the pre-prepared image, I noticed today that echo statement in

echo -e "\x0\x0\x0\x0\x0\x0\x0" >> $@

was adding text strings instead of what I assume was intended to be NUL-character padding at the end of the .bin file:

$ xxd blink.bin | tail -n 4
00020fa0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00020fb0: 0000 0000 0000 22fb d201 0600 2d65 205c  ......".....-e \
00020fc0: 7830 5c78 305c 7830 5c78 305c 7830 5c78  x0\x0\x0\x0\x0\x
00020fd0: 305c 7830 0a                             0\x0.

I have a PR with a tested fix. idcrook#1

$ xxd blink.bin | tail -n 4
00020f90: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00020fa0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00020fb0: 0000 0000 0000 22fb d201 0600 0000 0000  ......".........
00020fc0: 0000 0000                                ....

I also added a target (.bg-prog) in the shared makefile in same PR to use the fpga upload wrapper that comes with the pre-prepared image, since the .load target did now seem to be working for me.

cd ~/BeagleWire/examples/blink_leds
make
sudo make blink.bw-prog

Should I submit a PR here? I am wanting to make it easier for pre-prepared image/QuickStart to use the examples, etc.

fpga-load.ko fails with "Cannot find manager node"

Since I don't have the quick start firmare image due to issue #1, I've tried building the dev environment on a stock debian BBB image. To get to the point of being able to try the fpga-load.ko I had to:

  • update to 4.14 to get the fpga manager support and installed kernel headers
  • build fpga-mgr.ko and ice-spi.ko as out-of-tree modules and insmod'ed them
  • compile the DTS/BW-ICE40CapeV2-00A0.dts into a dtbo and installed it with the cape manager
  • fixup the paths in bw-prog.sh

When fpga-load.ko is insmod'ed by the script, it fails with "Cannot find manager node" and exits without loading the bitfile.

Which LCD used for examples/lcd_game ?

I'd like to purchase the LCD for the game, see how it works.
Could you add a README.md in the lcd and lcd_game directories describing where I can purchase the screen?

gpmc seems to occasionally mis-time address/data

I've been trying to track down why sdram results are sometimes wrong (issue #7) and think it might be due to gpmc occasionally mis-timing data and address. I modified the examples/sdram/top.v to require the top 8-bits of the commands to have a magic value and log any writes to gpmc address 0 that don't have those bits.

For a while everything is fine, but then a spurious value shows up, usually with some bits of the previous write.

icetime is reporting that we're meeting the 100 MHz timing goal (9.08 ns / 110.08 MHz), so I think it is related to the clock-crossing in gpmc.

Gate timing

These projects seam to have timing issues.? They need to be checked against the icetime utility. Even when using the nextpnr utility, which tries to improve timing by better placement, on a pc, the examples are below the 100Mhz.

Tool support

The proposed tool set includes archne-pnr. This tool claims to support only the 1K and 8K lattice parts of the iCE40 family. The beaglewire uses the 4K device. Can you please clarify.
Thanks

sdram can miss command transitions

It looks like the sdram_controller can miss read/write commands if they occur when a refresh is happening. It checks for edges on the enable pins only if state == IDLE:

  if (state == IDLE)
     if (rd_enable && !rd_enable_prev)
          begin
          next = READ_ACT;
          command_nxt = CMD_BACT;

but the rd_enable_prev and wr_enable_prev are updated on every clock cycle:

always @ (posedge clk)
   begin

    wr_enable_prev <= wr_enable;
    rd_enable_prev <= rd_enable;

PMOD pinout

Are the PMOD connectors reversed from the "standard"? The docs for most PMOD look like this, with pin 1 on the right side:

image

The ones on the BW have pin 1 on the left side and ground/power on the right.

Did the BeagleWire project die?

I see no updates in development since april 2018 . So, I suppose there are no new updates or examples (like "how to..") on te BeagleWire.
I tried for weeks to get the Wire working but without any succes. I always end up with: "fpga-load.ko not found".
I believe that when spending so much money on a BeagleBone Black and a BeagleWire it should be up and running within a few hours.

sdram `rd_busy` should be `rd_ready`?

Is the sense of the SDRAM's rd_busy incorrect? In the verilog code the logic is: https://github.com/pmezydlo/BeagleWire/blob/master/components/sdram_controller.v#L161

assign rd_ready = rd_ready_r;
[...]
   if (state == READ_READ)
      begin
      rd_data_r <= data_in_from_buffer;
      rd_ready_r <= 1'b1;
      end
    else
      rd_ready_r <= 1'b0;

Which makes rd_ready an active high signal when the read has data available. However, the sdram.c code calls it rd_busy and appears to spin waiting for it to go back to 0: https://github.com/pmezydlo/BeagleWire/blob/master/bridge_lib/sdram.c#L72 and

// waiting for clr rd ready bit
.

Although I just noticed that rd_ready_r is reset after one clk, so I'm updating my test to latch it to be sure that it is noticed by the host interface.

sdram read results are occasionally wrong

PR #6 adds a check for the value read from the sdram in bridge_lib/sdram.c as well as adds an XOR value so that repeated runs can be distinguished. This shows that it fails some of the time, but a repeated read works most of the time.

debian@arm:~/bridge-cleanup/bridge_lib$ sudo ./sdram 0x55
sdram=0xb6dec000
addr=0xb6dec002 0xb6dec004
rd_data=0xb6dec008
writing....
reading....
try 0 data[b]=5f BAD
try 0 data[17]=17 BAD
try 1 data[17]=17 BAD
try 2 data[17]=17 BAD
try 3 data[17]=17 BAD
try 0 data[2a]=7c BAD
try 0 data[4f]=1b BAD
try 0 data[52]=52 BAD
try 1 data[52]=52 BAD
try 2 data[52]=52 BAD
try 3 data[52]=52 BAD
try 0 data[5b]=f BAD
try 0 data[5d]=5d BAD
try 1 data[5d]=5d BAD
try 2 data[5d]=5d BAD
try 3 data[5d]=5d BAD

Reads where only one try is reported means that the second read worked and the first read was ignored (likely the value returned was stale; note that data[2a] read 0x7c, which is the correct value for the previous read since 0x7C == 0x21 ^ 0x55).

Reads where there are three tries indicate that perhaps the write failed (note that data[17] == 17, which indicates that the previous run with an XOR of 0x00 successfully wrote the value).

C source for arm_blink_leds?

I've read much, but am still not sure how write to /dev/mem in the beaglebone to make the arm_blink_leds example work.

Could you include a C program that does the right thing?
I would be happy to write a README.md for that example if I had a program that could flip those bits!

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.