Shop OBEX P1 Docs P2 Docs Learn Events
Thanks for port B, but I want 256 ports — Parallax Forums

Thanks for port B, but I want 256 ports

nutsonnutson Posts: 242
edited 2014-08-20 08:27 in Propeller 1
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???

Comments

  • pik33pik33 Posts: 2,366
    edited 2014-08-20 06:07
    I am implementing a system bus. At now (look at my demo project) I have the port B split into dirb,inb and outb. This will allow me to use 28 bits of dirb as an address bus, then 4 bits (maybe more, maybe less) as control bus. Then I have 32 bit data in and data out.

    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.
  • ozpropdevozpropdev Posts: 2,792
    edited 2014-08-20 06:12
    I just got around the problem of adding more IO pins by building 4 x P1V's in my DE2!
    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). :)
  • nutsonnutson Posts: 242
    edited 2014-08-20 06:13
    But how do you plan to operate this bus. Under SW control setting up data and addresses?? That's going to be damn slow.
  • nutsonnutson Posts: 242
    edited 2014-08-20 06:17
    oz propdev, Can these multiple V-Prop's communicate with each other? Internal D port as initially implemented in P2?? Or dual ported RAM??
  • ozpropdevozpropdev Posts: 2,792
    edited 2014-08-20 06:19
    The plan is to use PortB as the internal bus between all the props. :)
  • pik33pik33 Posts: 2,366
    edited 2014-08-20 08:26
    nutson wrote: »
    But how do you plan to operate this bus. Under SW control setting up data and addresses?? That's going to be damn slow.

    At the beginning, yes, under sw control, like I did in the demo code
                            mov     dirb,a1                 ' set address
                            mov     outb,lsample        ' output data
                            or      dirb,#256               ' strobe at dirb[8]
    

    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.
  • pik33pik33 Posts: 2,366
    edited 2014-08-20 08:27
    ozpropdev wrote: »
    I just got around the problem of adding more IO pins by building 4 x P1V's in my DE2!
    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). :)

    6 of them should fit. 7th will lack the memory resources.
  • pik33pik33 Posts: 2,366
    edited 2014-08-20 08:27
    ozpropdev wrote: »
    The plan is to use PortB as the internal bus between all the props. :)

    That is it.
Sign In or Register to comment.