Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    lemmeristan
    @lemmeristan
        sync : PROCESS (clk, reset)
        BEGIN
            IF reset = '1' THEN
                fill_count <= (OTHERS => '0');
                shift_reg <= (OTHERS => '0');
                current_address <= (OTHERS => '1');
    ...
                WHEN IDLE =>
                    led(1) <= '1';
                    IF (mem_re = '1') AND (address_valid = '1') THEN
                        IF current_address /= mem_addr(23 DOWNTO 13) THEN
                            n_state <= FILL_CACHE;
                            n_waitcounter <= 0;
                            n_fill_count <= (OTHERS => '0');
                        ELSE
                            mem_rdy <= '1';
                        END IF;
                    END IF;
    lemmeristan
    @lemmeristan
    I think I'll try this stuff on the arty s7 tomorrow, it has an integrated logic analyzer
    (I don't even have a soldering iron right now lol)
    emard
    @emard
    There is VHDL based project https://github.com/hdl4fpga/hdl4fpga which has intergrated oscilloscope with GUI, mouse and HDMI display. It can be used to display internal signals, but I haven't long time tried to refresh ulx3s port and it compiles only for diamond (ghdl too weak for coding style)
    Its GUI response speed is far superior than any hardware oscilloscope. All is done in VHDL, (no CPU)
    lemmeristan
    @lemmeristan
    but diamond doesnt detect ulx3s :/
    emard
    @emard
    ok not natively but it can leave .bit file and the fujprog. You don't need diamond to debug, ulx3s connects directly to mouse and monitor to inspect signals. OK other option is to single step CPU or have clk at each btn press to see what's going on at the bus, you can use my hex decoder core to hdmi. in ulx3s-misc
    Lawrie Griffiths
    @lawrie
    @emard I have started restructuring saxonsoc-ulx3s-bin. I have deleted the only stuff leaving just minimal and linux top level directories. The old usb stuff is now in linux/fpu/usb_host.
    I have added linux/nofpu/usb_host which now has 85f and 12f versions. A 12f fpu version is not possible.
    The rootfs filesystem is different for the fpu and nofpu versions, but if you use the nofpu version, it should work unchanged for 12f or 85f 32MB bitstreams. The same dtb and uImage work for both.
    I have not sorted out README files yet. I will probably add some more versions such as usb_device.
    Goran Mahovlic
    @goran-mahovlic
    I have tried to plug wires into ULX4M serdes TX and loaded litex PCIe example and I can capture noise with my Realtec RTL
    PCIe_serdes.png
    Sample is set to TX on 1.25GHz as my RTL does not go to 2.5
    But I cannot get this sample to do anything https://github.com/newhouseb/alldigitalradio
    And that one would be much better to experiment with
    emard
    @emard
    @lawrie this is wonderful, so bitstream which has FPU core can boot non-fpu SD, I will try this on 2 boards 12F and 85F and with setting up I can suggest something in readme for "consumer" type users
    @goran-mahovlic I also tried the CW example for alldigitalradio, it compiles cleanly but my RTL SDR doesn't capture any significant on TX. around 1.25 GHz. I was also thinking to start a VHDL module similar to ecp5pll, initially completely non-functional but with internal parameters and functions we would like it to have. VHDL for its data structures and records is I think more capable than verilog to handle complexity of serdes module.
    emard
    @emard
    Slika zaslona s 2021-12-06 13-42-19.png
    Goran Mahovlic
    @goran-mahovlic
    alldigital sample should broadcast on 2.5GHz
    emard
    @emard
    Here is my small research on serdes pair impedance parametrization. Above is x=integer parameter of DCU core, y=log(wanted impedance). I can see almost linear dependency so we could probably have function supporting all values inbetween.
    I wish we knew more about PLL parameters
    Lawrie Griffiths
    @lawrie
    @emard I have added a linux/nofpu/usb_device version. This works with the same rootfs as the usb_host versions but needs a new uImage and linux.dtb.
    emard
    @emard

    @lawrie Great! My suggestion would be some directory or file naming in order to copy directly files from git to SD and all be consistent, like

    /sd/linux/usb_host/uImage
    /sd/linux/usb_host/linux.dtb
    /sd/linux/usb_device/uImage
    /sd/linux/usb_device/linux.dtb
    /sd/linux/usb_host_fpu/uImage
    ....

    and set of u-boot commands in readme that can select which to boot

    emard
    @emard
    I don't know is there a better way, for example to have ESP32 script that with given file structure writes from SD to flash (it will not wear flash if same content is already in flash), loads bitstream, unmounts SD card and lets linux continue. So user just runs import linux12usbdev.py and waits for the login prompt
    import os, ecp5
    from machine import SDCard, Pin
    os.mount(SDCard(slot=3),"/sd")
    # on SD card already: dtb, uImage, bitstreams
    ecp5.flash("/sd/linux/usb/images/fw_jump.bin@0x340000",0x340000)
    ecp5.flash("/sd/linux/usb/images/u-boot.bin@0x360000",0x360000)
    ecp5.prog("/sd/linux/usb/bitstreams/ulx3s_85f_green_2core_fpu_saxonsoc.bit")
    os.umount("/sd")
    p12=Pin(12,Pin.IN)
    p13=Pin(13,Pin.IN)
    p14=Pin(14,Pin.IN)
    p15=Pin(15,Pin.IN)
    Goran Mahovlic
    @goran-mahovlic
    alldigital.png
    This is now alldigitalradio cw_out signal
    As I do not understand much I have changed SerDes pins in nmigen_boards, and in ecp5.py I changed that input clock is 50Hz clock (so I can get some activity on frequency I can see on my SDR)
    I will now check noise sample
    emard
    @emard
    Congratulations! It is good enough that it works, one doesn't need to understand why, theroreticians will explain later :)
    Also loopback example would be interesting, but I have seen litex notes that for their examples doesn't work. I was thinking of loopback to send some BTN state to TX side and connect RX side to LEDs. So one can push BTNs, data is encoded to serdes and with internal loopack it comes back and user see LEDs at BTNs press
    Also the working TX example for CW transmitter says that it is possible to use it for HDMI. But only 45F or 85F have 4 TX channels, smaller boards only 2 TX CH are not enough for HDMI
    Goran Mahovlic
    @goran-mahovlic
    noise.png
    that is noise sample
    I was disconnecting and connecting board to confirm
    emard
    @emard
    beautiful! It is also symmetric pattern around some center frequency which is typical for how the TX works
    Goran Mahovlic
    @goran-mahovlic
    @emard yes we can do small carrier board that only has HDMI - as on V002 all SerDes pins are connected on small connector
    I will now check loopback
    emard
    @emard
    I think this CW and noise examples push something like 20 bits for serdes encoding, for HDMI we need 10 bits (we can either duplicate bits or send 2 different pixels at one clock)
    Goran Mahovlic
    @goran-mahovlic
    Tx_Rx.jpg
    This is my current setup :)
    emard
    @emard
    Super, dipole antena should have lambda/2 wavelength for max efficiency, so for 1.25GHz: 3e8/1.25e9/2 = 0.12m = 12cm length end-to-end
    to tune, you don't need to cut wires, just bend them at ends tight backwards
    Goran Mahovlic
    @goran-mahovlic
    it is 12cm
    emard
    @emard
    Already tuned :)
    lemmeristan
    @lemmeristan
    @emard some weird stuff is happening... output to uart is no problem whatsoever, but gpio doesnt work... but it gets weider: this morning, I dumped that address and it was all 0s, so I keep flashing and dumping and it's 0s.... then I flash the code again, and it's all good again... then something told me "try uart, it will surely work" and I did and it works.... remember at the very beginning with the bidirectional stuff? perhaps its GHDL problem
    I kinda give up on bidirectional for now
    emard
    @emard
    Yes, bidirectional stuff is slightly suspicious on GHDL, I tried to move all 3-state switching to toplevel but still I'm not 100% sure is it working correctly. Especially if say we have inout gp(27 downto 0) and we want say gp(0) be bidirectional like setting "Z" logic and the rest either in or out - this works in diamond but not in trellis. So I have in constraints now gp0, gp1, gp2 etc so each separately (not member of bus array) can be in,out,inout
    emard
    @emard
    @lawrie I have tested 12F host - it works and detected mouse, 12F device boots but it doesn't enumerate when I plug to PC, I will continue tomorrow maybe all files and u-boot commands I haven't correctly done