-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
j1a8k doesn't use all available ram #42
Comments
There are unused ram blocks, yes. I've also been thinking on and off of a 24 bit Jx varient to So yes, there is ram free - afaicr about half the ram in the 8k is unused - I'd prefer to leave it free to implement some application-specific hardware If I had SDRAM on board, I'd just use it as a very deep FIFO on the way to But doing that also requires srams available to muster data for bursts I have used that sort of setup to maintain continuous 30MB/s captures from I'm really not at all keen on using SDRAM for system RAM. Too much latency, That the j4a only half-fills a 8k chip gives it a lot of flexibility. I |
Thanks for the explanation. I agree sdram is probably not the ideal. I would prefer more fpga ram being freed up, even if it addressed separately. My current requirements are to implement a fast DDS circuit in verilog (interfaced to swapforth), so I need a 512x10bit lookup table for arbitary waveforms. I don't want to use up any of the remaining 3k of ram for that if possible, as I want to write substantial Forth programs too .. By The way, can you explain how to use the current ram for that? I don't understand the ram.v module at all, or how the python program generates it from the .hex file ... Also, is there any documentation for the j4a cpu? I am guessing that it has 4 x simultaneous hardware threads? I can't find any description of it .. may be useful to me as well. Having open source shareable verilog modules is a great idea. I have some PWM modules with pre-scalers etc I could share as well. |
The j4a only has four sets of stacks - they round-robin through the ram and The arrangement means the alu could be pipelined, and that's where the At the moment, each thread runs 1/4 as fast as a j1a, but pipelining should The j4a is compatible with the j1a, in the sense that one can use the j1a |
Got it, thanks. Having 4 threads run as fast as the j1a would be awesome! Did you have any thoughts about my waveform table in fpgs ram? |
I'm currently doing something similar - except using the j4a to spit out I just copy paste the values from a spreadsheet, where the column had been I also keep track of the number of values with a constant, and the code There are other, more advanced ways to do this with forth. -- Remy |
Hi, Yes understand doing it in Forth. But, I want to spit out samples at 48Mhz I would like to know how to format the data to include in the ram arrays Any help there would be great .. On Wed, Oct 5, 2016 at 5:30 PM, RGD2 [email protected] wrote:
|
Hmm, might have to ask James, I don't really either. |
Thanks, will look into icebram. I also thought of creating the data as 16bit hex words, swapping the bytes, and adding/replacing the last block of values in nuc.hex (top of ram) with the contents. My Verilog module would then spit out the block to a 16bit DAC, I have some Verilog DDS code to do all that .. |
Any further idea's how I can implement the sine table I need in FPGA? I have no idea how to address it from verilog, even if I put it top of current RAM. |
Write a little verilog machine to generate it as you will without swapforth entirely - starting from one of the example designs. Then, when that works as expected, modify j1a.v to include the thing and include controls to allow your j1a instance to control it via io! and io@ . The block rams you'll add will be completely separate from the j1a's ram. See lattice's documentation for how the different EBR primitive blocks work in verilog. Obviously, combined this way, you'll have to 'deinterlace' your sine table into two 512 entry 8 bit tables - and then put them in the relevant spots. You could just use some dummy values in the verilog init streams, and then use icebram to extract all brams' from the fpga .bin file, so you can figure out which block is which, then use python to put the proper wavetables back into a format where icebram will accept them, to overwrite what's in the .bin fpga bitfile. |
I found a way to address the whole RAM available in HX8K - you can move the "fetch" bit out of the address space directly accessible with call/jmp/jnz and do a RAM fetch explicitely by or'ing/add'ing the high fetch bit and pass it to execute. Ok, it will render the sequence "variable @" longer, not only a single high-call opcode, but a literal and a "call execute", however, this is compensated by double the amount of RAM available. Regarding your other questions, I wired in the 16x16=32 multiplier as two different opcodes for the low and hight 16 bit part of the result. I also replaced do-loop with a stack only version, as James original variant involving a local variable was not interrupt safe. You can see my modifications to Swapforth in the current Mecrisp-Ice package on mecrisp.sourceforge.net |
Looks like ram is still 8K, I believe the ICE40HX8k fpga has 32K?
The text was updated successfully, but these errors were encountered: