Difference: DeviceDriverIop (1 vs. 13)

Revision 13
01 Jan 2010 - Main.JanMichel
Line: 1 to 1
Added:
>
>
META TOPICPARENT name="OutdatedPages"
  -- RadekTrebacz - 23 Oct 2006
Revision 12
30 Nov 2006 - Main.RadekTrebacz
Line: 1 to 1
  -- RadekTrebacz - 23 Oct 2006
Line: 90 to 90
 

Dataflow

Current state

Changed:
<
<
We are trying to connect PortC and IOP via BUS1: error on CRC
>
>
We are trying to connect PortC and IOP via BUS1[portC->SAP->CRC->FIFO->DMC]: we see data in the FIFO
 

META FILEATTACHMENT attr="" comment="Data flow in the IOP" date="1164644688" name="datapath.eps" path="datapath.eps" size="12515" user="RadekTrebacz" version="1.4"
Revision 11
27 Nov 2006 - Main.RadekTrebacz
Line: 1 to 1
  -- RadekTrebacz - 23 Oct 2006
Line: 88 to 88
  - change ownership for define module
HELP I dont know why so many nop operation should be put in the code

Dataflow

Changed:
<
<
>
>
 

Current state

We are trying to connect PortC and IOP via BUS1: error on CRC
Changed:
<
<

META FILEATTACHMENT attr="" comment="Data flow over IOP" date="1164636685" name="datapath.eps" path="datapath.eps" size="10463" user="RadekTrebacz" version="1.3"
>
>
META FILEATTACHMENT attr="" comment="Data flow in the IOP" date="1164644688" name="datapath.eps" path="datapath.eps" size="12515" user="RadekTrebacz" version="1.4"
Revision 10
27 Nov 2006 - Main.RadekTrebacz
Line: 1 to 1
  -- RadekTrebacz - 23 Oct 2006
Line: 88 to 88
  - change ownership for define module
HELP I dont know why so many nop operation should be put in the code

Dataflow

Changed:
<
<
>
>
 

Current state

We are trying to connect PortC and IOP via BUS1: error on CRC
Changed:
<
<
META FILEATTACHMENT attr="" comment="DataPath for IOP" date="1164632769" name="datapath.eps" path="datapath.eps" size="10497" user="RadekTrebacz" version="1.2"
>
>

META FILEATTACHMENT attr="" comment="Data flow over IOP" date="1164636685" name="datapath.eps" path="datapath.eps" size="10463" user="RadekTrebacz" version="1.3"
Revision 9
27 Nov 2006 - Main.RadekTrebacz
Line: 1 to 1
  -- RadekTrebacz - 23 Oct 2006
Line: 87 to 87
  HELP I dont see any data in FIFO in(I read status FIFO in), after I put some data in FIFO out [problem with connection FIFO out/in ?]
- change ownership for define module
HELP I dont know why so many nop operation should be put in the code
Added:
>
>

Dataflow

 

Current state

We are trying to connect PortC and IOP via BUS1: error on CRC
Added:
>
>

META FILEATTACHMENT attr="" comment="DataPath for IOP" date="1164632769" name="datapath.eps" path="datapath.eps" size="10497" user="RadekTrebacz" version="1.2"
Revision 8
23 Nov 2006 - Main.RadekTrebacz
Line: 1 to 1
  -- RadekTrebacz - 23 Oct 2006
Line: 88 to 88
  - change ownership for define module
HELP I dont know why so many nop operation should be put in the code
Added:
>
>

Current state

We are trying to connect PortC and IOP via BUS1: error on CRC
Revision 7
17 Nov 2006 - Main.RadekTrebacz
Line: 1 to 1
  -- RadekTrebacz - 23 Oct 2006
Line: 79 to 79
  MPU
- all threads are idle and running - They have to run in order to work SPU in the correct way. Why ? - dont ask me
SPU
Changed:
<
<
HELP I dont know which SPU uses the code write.spu.S
>
>
- Select SPU is done by variable IPO_USB_DMAMAPPING
  - read/write external memory [SDRAM]
- use FSM
- read status FIFO out / put data to FIFO out
Revision 6
15 Nov 2006 - Main.RadekTrebacz
Line: 1 to 1
  -- RadekTrebacz - 23 Oct 2006
Line: 85 to 85
  - read status FIFO out / put data to FIFO out
- read status FIFO in
HELP I dont see any data in FIFO in(I read status FIFO in), after I put some data in FIFO out [problem with connection FIFO out/in ?]
Changed:
<
<
- ownership could be changed in:
hadaq@hadeb05:~/soft/devboard-fs_32v2/os/linux-2.6/drivers/iop/common-R1_00/iop-usb.c in function: iop_usb_config
>
>
- change ownership for define module
  HELP I dont know why so many nop operation should be put in the code
Revision 5
15 Nov 2006 - Main.RadekTrebacz
Line: 1 to 1
  -- RadekTrebacz - 23 Oct 2006
Added:
>
>
 

Assembler code: I/O test

Line: 41 to 42
 

.end
Added:
>
>

Code sources

Code for SPU inhabits in:
hadaq@hadeb05:~/soft/devboard-fs_32v2/os/linux-2.6/firmware/write.spu.S
for MPU
hadaq@hadeb05:~/soft/devboard-fs_32v2/os/linux-2.6/firmware/1.mpu.S
Device Driver Code:
hadaq@hadeb05:~/soft/devboard-fs_32v2/os/linux-2.6/drivers/iop/
To put a new version of device driver to the NFS directory type:
make nfs in the directory
~/soft/devboard-fs_32v2/os/linux-2.6/drivers/iop/cris-2.6-R1_02
To put a new version of firmware [1.mpu.bin and write.spu.bin] to NFS directory type:
make clean && make nfs in the directory
~/soft/devboard-fs_32v2/os/linux-2.6/firmware
To load a firmware to IOP memory by device driver type:
cd /home/hadaq && insmod ./crisv32-usb-hcd.ko mpu_fw="1.mpu.bin" spu_fw="write.spu.bin"
 

TIPS:

Changed:
<
<
Between the lines:
>
>
TIP ownership could be changed in:
hadaq@hadeb05:~/soft/devboard-fs_32v2/os/linux-2.6/drivers/iop/common-R1_00/iop-usb.c in function: iop_usb_config
ALERT! between the lines:
 
rwq REG_STATE (iop_sw_spu, rw_mc_ctrl, keep_owner, no) | \
      REG_STATE (iop_sw_spu, rw_mc_ctrl, cmd, wr) | \
Line: 53 to 72
 

rr REG_ADDR(iop_sw_spu, iop_sw_spu0, r_mc_stat), r15
Changed:
<
<
has to be nop. In the other hand I got Segmentation fault
>
>
has to be nop. In the other case I got Segmentation fault
 
Deleted:
<
<
My first code inhabits in: hadaq@hadeb05:~/soft/devboard-fs_32v2/os/linux-2.6/firmware/write.spu.S

To load a firmware to IOP memory type: cd /home/hadaq && insmod ./crisv32-usb-hcd.ko spu_fw="write.spu.bin"

IT'S WORKING
 
Changed:
<
<
Problem: This code write 0x111 under 0xC0000000. The 'ram_wr_r' is wrinting under this address too. IOP write under this address periodicly. Why?
>
>

Up to now:

MPU
- all threads are idle and running - They have to run in order to work SPU in the correct way. Why ? - dont ask me
SPU
HELP I dont know which SPU uses the code write.spu.S
- read/write external memory [SDRAM]
- use FSM
- read status FIFO out / put data to FIFO out
- read status FIFO in
HELP I dont see any data in FIFO in(I read status FIFO in), after I put some data in FIFO out [problem with connection FIFO out/in ?]
- ownership could be changed in:
hadaq@hadeb05:~/soft/devboard-fs_32v2/os/linux-2.6/drivers/iop/common-R1_00/iop-usb.c in function: iop_usb_config
HELP I dont know why so many nop operation should be put in the code
 
Revision 4
02 Nov 2006 - Main.RadekTrebacz
Line: 1 to 1
  -- RadekTrebacz - 23 Oct 2006
Line: 54 to 54
  rr REG_ADDR(iop_sw_spu, iop_sw_spu0, r_mc_stat), r15 has to be nop. In the other hand I got Segmentation fault
Added:
>
>

My first code inhabits in: hadaq@hadeb05:~/soft/devboard-fs_32v2/os/linux-2.6/firmware/write.spu.S

To load a firmware to IOP memory type: cd /home/hadaq && insmod ./crisv32-usb-hcd.ko spu_fw="write.spu.bin"

IT'S WORKING

Problem: This code write 0x111 under 0xC0000000. The 'ram_wr_r' is wrinting under this address too. IOP write under this address periodicly. Why?
 
Revision 3
31 Oct 2006 - Main.RadekTrebacz
Line: 1 to 1
  -- RadekTrebacz - 23 Oct 2006
Line: 41 to 41
 

.end
Added:
>
>

TIPS:

Between the lines:
rwq REG_STATE (iop_sw_spu, rw_mc_ctrl, keep_owner, no) | \
      REG_STATE (iop_sw_spu, rw_mc_ctrl, cmd, wr) | \
      REG_FIELD (iop_sw_spu, rw_mc_ctrl, size, 0x4) | \
      REG_STATE (iop_sw_spu, rw_mc_ctrl, wr_spu0_mem, no) | \
      REG_STATE (iop_sw_spu, rw_mc_ctrl, wr_spu1_mem, no), \
      REG_ADDR (iop_sw_spu, iop_sw_spu0, rw_mc_ctrl)

rr REG_ADDR(iop_sw_spu, iop_sw_spu0, r_mc_stat), r15
has to be nop. In the other hand I got Segmentation fault
 
Revision 2
23 Oct 2006 - Main.AttilioTarantola
Line: 1 to 1
Added:
>
>
-- RadekTrebacz - 23 Oct 2006
 
Changed:
<
<
-- RadekTrebacz - 23 Oct 2006
>
>

Assembler code: I/O test

-The original file with headers is in hadaq@hadeb05:~/soft/devboard-fs_32v2/os/linux-2.6/arch/cris/arch-v32/attilio>

-Name file: wr.S

-This code is written for SPU. The steps are: enable bus0, map bus0 to port PB, set output enable for bus0, set bus ouput

- I compile with the command line: iopasm --arch SPU --output-format binary -o wr.spu.bin wr.S


#define ASSEMBLER_MACROS_ONLY

#define reg_iop_sw_spu_rw_bus0_oe_mask_offset 0x0000

spu0_start:

;set enable for bus0--> BUS [7,0]

rwq 0xffff, REG_ADDR(iop_sw_spu, iop_sw_spu0, rw_bus0_oe_mask)

;Mapping of bus0[7:0].a: Mapping a, port PB[7:0] is selected a=1

rwq 0x1, REG_ADDR_VECT_X_(iop_sw_cfg, 0x1, 0x1, 0x1) ;REG_ADDR_VECT_X_( inst, offs, index, stride ) if I use the standard macro REG_ADDR VECT I get error becouse stride not defined!!!!!??

;set output enable for all 32 bit of the bus0

rwq 0x0, REG_ADDR(iop_sw_spu, iop_sw_spu0, rw_bus0_set_mask_lo)

rwq 0x0, REG_ADDR(iop_sw_spu, iop_sw_spu0, rw_bus0_set_mask_hi)

;BOUT is SPU special register. set initial value in the bus0

moveq 0xffff, B0OUT

halt

.end
 
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Hades Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)