Thanks for port B, but I want 256 ports
nutson
Posts: 242
Having a port B may be a relief to some people, but if I look at the large number of on board FPGA resources we may want to address (DE2-115 has SRAM, DRAM, SW, an HSMC connector where I have a fast 14 bit dual channel AD/DA board for, VGA, sound to just name a few), port B is not really going to help. I want a lot of I/O ports, 64 maybe 256. A larger FPGA board has 8-16 resources that I may want to give each several control and configuration registers. I see three ways of implementing this:
1 - Memory mapped. I could take some of the ROM address space. This could work in PASM and SPIN, but may interfere with other brilliant ideas to use the ROM space for extra RAM
2 - Phil suggested to use multiple banks of SPR registers, This is feasible, but we need an instruction to set the iobankselect. Would SPIN allow writing to CNT??
3 - repurpose the not implemented ENC and ONES instructions to act as WriteReg D S and ReadReg D, S. This would work fine in PASM, but how could we use this in SPIN???
1 - Memory mapped. I could take some of the ROM address space. This could work in PASM and SPIN, but may interfere with other brilliant ideas to use the ROM space for extra RAM
2 - Phil suggested to use multiple banks of SPR registers, This is feasible, but we need an instruction to set the iobankselect. Would SPIN allow writing to CNT??
3 - repurpose the not implemented ENC and ONES instructions to act as WriteReg D S and ReadReg D, S. This would work fine in PASM, but how could we use this in SPIN???
Comments
Maybe I will need some more input pins to implement this.
At now, I used 32 bits of outb as data bus for transferring data from the propeller to the audio buffer. 8 bits of dirb was used to address and 3 bits of inb was used for handshake and synchronization. As I want to add a hardware sd controller and sram/sdram, I will convert this to a real system bus.
All 4 props can be programmed from a single propplug too.
I'm doing a bit more testing and then I will try a 6 x P1v build. (I think that will fit in a DE2).
At the beginning, yes, under sw control, like I did in the demo code
Let make it work. Then I will think how to make things faster if needed. And I am thinking about direct execute from portb. This will need some hardware extension, but.. later.
SW control speed is enough to make DE2-115 play the music. After I add the sd controller (I have it ready) there is possibility to make it in the way that the Propeller will only have to to tell what sector has to be read form SD and then the data will be automatically loaded to the sound buffer.
6 of them should fit. 7th will lack the memory resources.
That is it.