GithubHelp home page GithubHelp logo

sipeed / tangnano-9k-example Goto Github PK

View Code? Open in Web Editor NEW
191.0 18.0 61.0 6.59 MB

TangNano-9K-example project

GLSL 96.35% Verilog 3.06% Makefile 0.03% Coq 0.18% Assembly 0.01% C 0.08% SystemVerilog 0.25% Python 0.04% Tcl 0.01%

tangnano-9k-example's Introduction

TangNano-9K-example

Question

Error Code RP2017

When you meet error code PR2017. Do what is shown below.(Just enable corresponding IO as regular IO)

PR2017

Examples

led

Demo project for drive LED and on board led. LED guide is at https://wiki.sipeed.com/hardware/en/tang/Tang-Nano-Doc/examples.html

led

lcd_led

Demo project for drive RGB LCD and on board led, to drive the 5 inch RGB screen with 800*480 resolution.

lcd

lcd_4.3

Demo project for drive RGB LCD and on board led, to drive the 4.3 inch RGB screen with 480*272 resolution.

3_colorbar

picotiny

A PicoRV32-based SoC example with HDMI terminal from SimpleVout, SPI Flash XIP from picosoc, and custom UART ISP for flash programming. UART baudrate default at 115200.

See README.md for detailed description.

picorv

hdmi

Project based on picotiny example, but all soft_core related codes are removed.

spi_lcd

This is an example to drive the 1.14 inch lcd screen which can connect with this board.

Be sure match board with screen in the same order

spi_lcd

uart

FPGA uart example, containing 2 uart example messages. Burn into FPGA and open onboard serial port to check the message with 115200 baudrate.

FPGA can not be burned when the serial port is opened.

Internet_learning_resources

Use command git submodule --init update to get the source code.

TangNano9k_tutorial

Source link: https://gitee.com/lanzhoo/TangNano9k_Tutorial.git

Step tutorials to build a softcore running via arduino.

tangnano9k-series-examples

Source link: https://github.com/lushaylabs/tangnano9k-series-examples

Example codes on Tang Nano 9K, read https://learn.lushaylabs.com/tang-nano-series/ to see the usages.

tangnano-9k-example's People

Contributors

dashxdr avatar nekomona avatar wonderfullook avatar zepan 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

tangnano-9k-example's Issues

problem compiling provided .c files

Sorry for the question, i'm a begginer and fell like some things of the picotiny are not well documented, like the addresses of peripherals.
When i clone the repository and flash the default example file provided, it works like a charm, but when i compile and flash the UART won't respond at all and the HDMI output shows the default background and some garbage.

this is my toolchain
RISCV_NAME ?= riscv-none-elf
RISCV_PATH ?= /home/gusta/.local/xPacks/@xpack-dev-tools/riscv-none-elf-gcc/13.2.0-2.1/.content/

Can someone help with tips for compiling, the adresses os peripherals and how to get simple UART input output from the provided code?

Issues about using GAO

I can download .fs files via gowin programmer. But when I open GAO, the system shows that "Fs file download failed". How to fix this problem?

Anyone got pong to work?

There is an unused file (as far as I can tell) TangNano-9K-example/picotiny/hw/hdmi/svo_pong.v Looks like it emulates the old Atari Pong game. Any ideas how to make it work?

Thanks for any help.

Rick

Failed to build the project on a Raspberry Pi 3b+ running Debian 11 aarch64

When the attached is compiled as follows, it generates an ICE:
during GIMPLE pass: pcom
isp_flasher.c: In function 'main':
isp_flasher.c:125:5: internal compiler error: tree check: expected ssa_name, have integer_cst in ptr_deref_may_alias_decl_p, at tree-ssa-alias.c:241
125 | int main()
| ^~~~
0x7f9f82e217 __libc_start_main ../csu/libc-start.c:308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See https://github.com/sifive/freedom-tools/issues/ for instructions.
make[1]: *** [Makefile:110: build/isp_flasher.o] Error 1
make[1]: Leaving directory '/home/pi/TangNano-9K-example/picotiny/fw/fw-brom'
make: *** [Makefile:24: brom] Error 2

And here is the information of the gcc:
$ riscv-none-embed-gcc -v
Using built-in specs.
COLLECT_GCC=riscv-none-embed-gcc
COLLECT_LTO_WRAPPER=/home/pi/.local/xPacks/@xpack-dev-tools/riscv-none-embed-gcc/10.2.0-1.2.1/bin/../libexec/gcc/riscv-none-embed/10.2.0/lto-wrapper
Target: riscv-none-embed
Configured with: /Host/home/ilg/Work/riscv-none-embed-gcc-10.2.0-1.2/linux-arm64/sources/riscv-gcc-10.2.0-1.1/configure --prefix=/Host/home/ilg/Work/riscv-none-embed-gcc-10.2.0-1.2/linux-arm64/install/riscv-none-embed-gcc --infodir=/Host/home/ilg/Work/riscv-none-embed-gcc-10.2.0-1.2/linux-arm64/install/riscv-none-embed-gcc/share/doc/info --mandir=/Host/home/ilg/Work/riscv-none-embed-gcc-10.2.0-1.2/linux-arm64/install/riscv-none-embed-gcc/share/doc/man --htmldir=/Host/home/ilg/Work/riscv-none-embed-gcc-10.2.0-1.2/linux-arm64/install/riscv-none-embed-gcc/share/doc/html --pdfdir=/Host/home/ilg/Work/riscv-none-embed-gcc-10.2.0-1.2/linux-arm64/install/riscv-none-embed-gcc/share/doc/pdf --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu --target=riscv-none-embed --with-pkgversion='xPack GNU RISC-V Embedded GCC aarch64' --with-bugurl=https://github.com/sifive/freedom-tools/issues/ --enable-languages=c,c++ --disable-mingw-wildcard --enable-plugins --enable-lto --enable-checking=yes --disable-tls --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-threads --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-riscv-none-embed --with-sysroot=/Host/home/ilg/Work/riscv-none-embed-gcc-10.2.0-1.2/linux-arm64/install/riscv-none-embed-gcc/riscv-none-embed --with-native-system-header-dir=/include --with-abi=ilp32 --with-arch=rv32imac --disable-build-format-warnings --with-system-zlib
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (xPack GNU RISC-V Embedded GCC aarch64)

The attached code compiles OK with a x86_64 linux host with the gcc has the same version number.

HDMI Example ?

I'm trying to port my HDMI example from tangnano4k to tangnano9k but I have some problems with TLVDS_OBUF.
https://github.com/Martoni/HdmiCore

ERROR  (CT1005) : Conflicting multiple constraints specified for location of Instance 'O_tmds_clk_p'(type: TLVDS_OBUF); Or constrained location for the Instance is not available; Or constrained location type is not matched with the instance

Is there an example using HDMI/DVI with TangNano9k ?

Thanks

Best Way to Debug?

Hi there!

I have been tinkering with my nano 9k for a while now. I was wondering about how you debugged and coded picotiny.
I was trying to use GAO but is that the best way?

Imagine one wants to write a new riscv for nano 9k. What' the best approach and what are available debug tools?

I appreciate your answer in advance.

BL702 UART firmware update on Tang Nano 9k

I tried to drive 1Mbps uart to the BL702, but I see incorrect data. I can drive the same uart data to a board pin and look at with my logic analyzer (pulseview) and it looks fine. My Tang Nano 1k board uart works fine after I updated the CH552 firmware. Does the BL702 firmware need to be updated?
Thank you.

Picotiny example fails during Place & Route

With Gowin_V1.9.9Beta-4_Education it seems I'm unable to place and route the picotiny example.

ERROR (PA2122) : Not support 'mem_mem_0_0_s'(DPB) WRITE_MODE0 = 2'b10, please change write mode WRITE_MODE0 = 2'b00 or 2'b01.

I've tried to read through https://wiki.sipeed.com/hardware/en/tang/Tang-Nano-9K/examples/picorv.html but such a problem is not mentioned.
This is my first time I tried to build a Gowin FPGA project so I'm a little bit lost. I tried searching for this online but I'm also unable to find anything about this.

Can't flash firmware

Hi,

I can only flash the example-fw-flash.v! When I build a firmware with make flash I can't flash it! Do you know why?
Also make brom will not fit: /opt/riscv32i/lib/gcc/riscv32-unknown-elf/11.1.0/../../../../riscv32-unknown-elf/bin/ld: region `BROM' overflowed by 1296 bytes

make -C fw/fw-flash
make[1]: Entering directory '/home/hd/tmp/TangNano-9K-example/picotiny/fw/fw-flash'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/hd/tmp/TangNano-9K-example/picotiny/fw/fw-flash'
python sw/pico-programmer.py fw/fw-flash/build/fw-flash.v /dev/ttyUSB4
Read program with 8912 bytes

  • Waiting for reset -
    ...
    Total sectors 3
    Total pages 35
    Flashing 1 / 3
    Flashing 2 / 3
    Flashing 3 / 3
    Too many retires on sending data to page buffer
    Flashing failed

Half of examples no work

Just like other Dev. Boards from SiPEED half of the projects work and half not. I first bought a MAIXDUINO about a year ago. The same thing, no support, only some demonstration projects work. Then I bought an M0P Dock about a month ago, that board never worked.
You are a real disappointment to both yours and the manufacturers whose components you use.
I have no intention of ever buying anything from SiPEED again.

spi_lcd 中的 `ifdef MODELTECH 似乎是错的

原文:

`ifdef MODELTECH
localparam CNT_100MS = 32'd2700000;
localparam CNT_120MS = 32'd3240000;
localparam CNT_200MS = 32'd5400000;
`else
// speedup for simulation
localparam CNT_100MS = 32'd27;
localparam CNT_120MS = 32'd32;
localparam CNT_200MS = 32'd54;
`endif

按照 https://stackoverflow.com/a/16745244 的回答,这个宏定义的名称应该是 MODEL_TECH ,而且 if-else 写反了,最后仿真下是正常的,但实际烧录后会无法正确复位。刚上电屏幕能正常显示,复位后就不显示了。
改为:

`ifdef MODEL_TECH

    // speedup for simulation
    localparam CNT_100MS = 32'd27;
    localparam CNT_120MS = 32'd32;
    localparam CNT_200MS = 32'd54;

`else

    localparam CNT_100MS = 32'd2700000;
    localparam CNT_120MS = 32'd3240000;
    localparam CNT_200MS = 32'd5400000;

`endif

然后测试正常。

What are the pin numbers for the two buttons on Tang Nano 9K?

I am unable to figure out the pin numbers for the two buttons on the Tang Nano 9K board based on the pinout diagram at https://wiki.sipeed.com/hardware/en/tang/Tang-Nano-9K/Nano-9K.html

image

Does anyone know what those would be?

(btw that pinout diagram also does not list the LED numbers, although those can be found at

IO_LOC "led[5]" 16;
IO_PORT "led[5]" PULL_MODE=UP DRIVE=8;
IO_LOC "led[4]" 15;
IO_PORT "led[4]" PULL_MODE=UP DRIVE=8;
IO_LOC "led[3]" 14;
IO_PORT "led[3]" PULL_MODE=UP DRIVE=8;
IO_LOC "led[2]" 13;
IO_PORT "led[2]" PULL_MODE=UP DRIVE=8;
IO_LOC "led[1]" 11;
IO_PORT "led[1]" PULL_MODE=UP DRIVE=8;
IO_LOC "led[0]" 10;
IO_PORT "led[0]" PULL_MODE=UP DRIVE=8;

)

picotiny example doesn't show up via HDMI capture

Hi,

I have successfully flashed the picotiny example to the Tang Nano 9K and it works on my LCD monitor via HDMI. However, when I connect it to a HDMI capture device, the HDMI video is not detected. I have tried the Elgato Cam Link 4K as well as a generic USB HDMI capture device that you can buy on ebay/aliexpress: https://www.adafruit.com/product/4669 - in both cases I just get a black screen, and the status LED on the Cam Link indicates that there is no HDMI detected.

I have previously used these capture devices with the ULX3S ECP5-based dev kit, so I know they work with some form of HDMI from FPGAs.

Has this example been tested on a HDMI capture device? I also tried the Martoni HdmiCore code, but it gives the same result: Martoni/HdmiCore#7

Hdmi example with pll and dvi tx

Is there any example to Hdmi output usingpll and dvi_tx ip core?
I try to port from tang nano 4k but it is'not working for this board

[picotiny] Flashing got stuck at `Flashing 1/3`.

Hello, I am new to Tang Nano and I would like to try some examples on it.

I have followed every step in https://wiki.sipeed.com/hardware/zh/tang/Tang-Nano-9K/examples/picorv.html. And when I tried to download the firmware onto the flash, the program got stuck at Flashing 1/3

(base) PS D:\Gowin\gowin_prj\TangNano-9K-example-main\TangNano-9K-example-main\picotiny> python .\sw\pico-programmer.py .\example-fw-flash.v COM19
Read program with 11760 bytes
- Waiting for reset -                                                                                                     
...
Total sectors 3                                                                                                         
Total pages 46                                                                                                          
Flashing 1 / 3                                                                                                             

After two hours or so, I terminated the program by sending Ctrl+C and the output was:

Traceback (most recent call last):
File "D:\Gowin\gowin_prj\TangNano-9K-example-main\TangNano-9K-example-main\picotiny\sw\pico-programmer.py", line 169, in <module>                                                                                                                 
isp_exec_esec(ser, curraddr)                                                                                          
File "D:\Gowin\gowin_prj\TangNano-9K-example-main\TangNano-9K-example-main\picotiny\sw\pico-programmer.py", line 31, in isp_exec_esec                                                                                                             
isp_wait_byte(ser, 0x32)                                                                                              
File "D:\Gowin\gowin_prj\TangNano-9K-example-main\TangNano-9K-example-main\picotiny\sw\pico-programmer.py", line 15, in isp_wait_byte                                                                                                             
resp = ser.read()                                                                                                     
File "D:\Program_Files\Anaconda\lib\site-packages\serial\serialwin32.py", line 288, in read                               
result_ok = win32.GetOverlappedResult(                                                                              
KeyboardInterrupt

It seemed that it was stuck at isp_wait_byte().

If someone could give a light on this, I would appreciate it.

Examply picotiny project doesn't place/route

The picotiny example can be synthesized but place&route fails due to the SPI constraints in picotiny.cst file.

ERROR  (PR2028) : The constrainted location is useless in current package
ERROR  (PR2017) : 'flash_csb' cannot be placed according to constraint, for the location is a dedicated pin (MSPI)
ERROR  (PR2028) : The constrainted location is useless in current package
ERROR  (PR2017) : 'flash_clk' cannot be placed according to constraint, for the location is a dedicated pin (MSPI)
ERROR  (PR2028) : The constrainted location is useless in current package
ERROR  (PR2017) : 'flash_miso' cannot be placed according to constraint, for the location is a dedicated pin (MSPI)
ERROR  (PR2028) : The constrainted location is useless in current package
ERROR  (PR2017) : 'flash_mosi' cannot be placed according to constraint, for the location is a dedicated pin (MSPI)

How to use with Mac?

I'm stuck at the Gowin part which does not seem to run on Mac

ATM I'm looking at how to run Gowin in Docker Ubuntu or in the cloud with port forwarding - if you have any instructions on how to do so?

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.