2024-04-01ãã1ã¶æéã®è¨äºä¸è¦§
LiteXã®UARTããã¤ã¹ã®æåã確èªãããã¦ãMigenã®ã½ã¼ã¹ã³ã¼ãããã§ãã¯ãã¦ããï¼ UARTã®ããã¤ã¹ã¯ãWishboneãçµç±ãã¦æ¥ç¶ããã¦ããã litex/litex/soc/cores/uart.py class UARTWishboneBridge(UARTBone): def __init__(self, pads, clk_freq, baudâ¦
èªä½CPUã®Spikeã·ãã¥ã¬ã¼ã¿ãããªãä¹ ãã¶ãã«ã¢ãããã¼ãããã¨ãããããªé¢æ°ãå¤ãã£ã¦ãã¦ããªãæ¸æã£ã¦ãã¾ã£ãã LiteXã¨Spikeã®è¨å®ãå¤æ´ã§ããããã«ãã¦ãã¨ããããLiteXã¢ã¼ãã§åä½ããããã«ããã Spikeå´ã®BootROMãåé¤ããå¿ è¦ããããâ¦
èªä½CPUã®Spikeã·ãã¥ã¬ã¼ã¿ãããªãä¹ ãã¶ãã«ã¢ãããã¼ãããã¨ãããããªé¢æ°ãå¤ãã£ã¦ãã¦ããªãæ¸æã£ã¦ãã¾ã£ãã ååãã¢ãã«ã·ãã¥ã¬ã¼ã¿ãéä¸ã§ãã³ã°ãã¦ãã¾ã£ã¦ããã®ã ããä¸åº¦å ¨é¨Cleanãã¦ããç´ãã¨å¤åã¡ããã¨åãã¦ããã LiteXã¨Spiâ¦
RISC-Vã®ãããã¡ã¤ã«ã«ã¤ãã¦ãRVAã«ç¶ãã¦RVBã¨ããè¬ã®ãããã¡ã¤ã«ã追å ããã¦ããã®ã§èª¿æ»ãããã¨ã«ããã RVAã¨ããã®ã¯RISC-Vã®ãããã¡ã¤ã«ã®ãã¡ã¢ããªã±ã¼ã·ã§ã³ã»ããã»ããµåãã®ãã®ã§ããã ä¸æ¹ã§ãRVBã¨ããã®ãã¢ããªã±ã¼ã·ã§ã³ã»ããã»â¦
èªä½CPUã®Spikeã·ãã¥ã¬ã¼ã¿ãããªãä¹ ãã¶ãã«ã¢ãããã¼ãããã¨ãããããªé¢æ°ãå¤ãã£ã¦ãã¦ããªãæ¸æã£ã¦ãã¾ã£ãã ååãã¢ãã«ã·ãã¥ã¬ã¼ã¿ãéä¸ã§ãã³ã°ãã¦ãã¾ã£ã¦ããã®ã ããä¸åº¦å ¨é¨Cleanãã¦ããç´ãã¨å¤åã¡ããã¨åãã¦ããã ãã ãããâ¦
èªä½CPUã®Spikeã·ãã¥ã¬ã¼ã¿ãããªãä¹ ãã¶ãã«ã¢ãããã¼ãããã¨ãããããªé¢æ°ãå¤ãã£ã¦ãã¦ããªãæ¸æã£ã¦ãã¾ã£ãã ä¸å¿ãã¹ã¦ã®ã³ã³ãã¤ã«ã¨ã©ã¼ãç´ãã¦åããã¦ã¿ãããã©ããéä¸ã§ã¨ã©ã¼ãçºçããã argv[7] = --log-commits argv[8] = --dtb=.â¦
LiteXã®BIOSã½ããã¦ã§ã¢ãç¬èªã«æ§ç¯ããæ¹æ³èª¿æ» (2. Spikeã®CLINTã®åä½ç¢ºèª)
CLINT : 0x02000000 PLIC : 0x0c000000 MIEãè¨å®ããã¨ãã¿ã¤ãå²ãè¾¼ã¿ããããã core 0: 3 0x0000000000001760 (0x09313c23) mem 0x0000000010001fd8 0x0000000000000000 core 0: 0x0000000000001764 (0x0c0027b7) lui a5, 0xc002 core 0: 3 0x000000000â¦
ææ°ã®Spikeã®å®è£ ã«ã¢ãããã¼ããã¦ãPLICã¨CLINTãåããããã«ãããããã£ã¦ã¿ãã LiteXã®BIOSãåããããã¦ããããããã£ã¦ããã ../spike_dpi/riscv-isa-sim/spike -l --log-commits --dtb=../dts/rv64imafdc.dtb --pc=0 -m0x0:0x100000,0x100000â¦
ååã®ç¶ããexception interrupt #7ã¨ããã®ã¯ä¾å¤ãã¨æã£ã¦ãããå²ãè¾¼ã¿ã ã£ãã ã¤ã¾ãããã®å²ãè¾¼ã¿ãå ¥ã£ãæç¹ã§ã¿ã¤ãå²ãè¾¼ã¿ãæãã£ã¦ãããã¨ããããã ã¿ã¤ãå²ãè¾¼ã¿ã¯CLINTãè¡ãã¯ããªã®ã§ããã®è¾ºã確èªãã¦ã¿ãã core 0: 3 0x0000000â¦
ã¡ãã£ã¨èªä½CPUã®æ¤è¨¼ç°å¢ã調æ´ãããã¦ããªã»ããæã®PC=0ã¨ãã¦å®è¡ãã¦æ¤è¨¼ãèµ°ããããã®ã ããã©ãã«ãSpikeãã¨ã©ã¼ãåºãã¦ãã¾ãã 0x0ã«ãã¼ãã³ã¼ããå«ãã§ããELFããã¼ãããã¨ãinvalid write to 0ã®ãããªæãã§ã¨ã©ã¼ãåºåãã¦å®è¡ã§ããªâ¦
LiteXã®BIOSç«ã¡ä¸ãç°å¢ããç¬èªã®RTLã·ãã¥ã¬ã¼ã·ã§ã³ç°å¢ã«ç§»æ¤ãããã¦ãã¡ã¢ãã¦ããã åºæ¬çã«ãLiteXããã¦ã³ãã¼ãããã¨ãã«ç»å ´ããlitex/litex/soc/software/ã丸ãã¨å¥ãã£ã¬ã¯ããªã«ç§»åãããã¨ã«ãªãã ããã«ãã©ã¤ãã©ãªãä½æããã®ãpytâ¦
0x28ä»è¿ã§ã«ã¼ããã¦ãããããã¯ä¾å¤å¦çã®é¨åã 0000000000000020 <trap_entry>: 20: fe113c23 sd ra,-8(sp) 24: fe513823 sd t0,-16(sp) 28: fe613423 sd t1,-24(sp) 2c: fe713023 sd t2,-32(sp) 30: fca13c23 sd a0,-40(sp) 34: fcb13823 sd a1,-48(sp) 38: fcc134</trap_entry>â¦
å°ãåã«è©±é¡ã«ãªã£ã¦ããããã©ããRustã§è¨è¿°ããããªã¼ãã³ã½ã¼ã¹ã®æ³¢å½¢ãã¥ã¼ã¯ã®Surferã«ã¤ãã¦ãããã試è¡ãã¦ããã surfer-project / surfer · GitLab ããã¾ã§ã¯åºæ¬çã«æ³¢å½¢ãã¥ã¼ã¯ã¨ãã¦GTKwaveã使ã£ã¦ããã®ã ããã©ããã©ãã«ãGTKwaveã使â¦
LiteXã«ãããUARTã®æ¸ãè¾¼ã¿ã«ã¤ãã¦ããã®ããã¼ã確èªãã¦ããã litex/litex/soc/software/libc/stdio.c static int litex_putc(char c, FILE *file) { (void) file; /* Not used in this function */ #ifdef CSR_UART_BASE uart_write(c); if (c == '\nâ¦