[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [usb] Usb1.1: Minor inconsistent behaviour



On Sun, 2003-07-06 at 07:32, Evan Jones wrote:
> Hello,

....

> #2. The device is reading the string configuration from the wrong part 
> of the ROM. We were having difficulty getting the string descriptors to 
> work, so we modified the Linux kernel to print the data that it was 
> reading. Using this, we were able to determine where in the ROM our 
> data was being read from by filling the string descriptors in the ROM 
> with the address of each byte. It appears to us that the device is 
> reading from the wrong address in the ROM. I've labelled the lines 
> where we think it should read from, and where it actually reads from.
> 
> section from usb1_defines.v:
> 
> `define	ROM_SIZE0	7'd018	// Device Descriptor Length
> `define	ROM_SIZE1	7'd032	// Configuration Descriptor Length
> `define	ROM_SIZE2A	7'd004	// Language ID Descriptor Start Length
> `define	ROM_SIZE2B	7'd010	// String Descriptor Length
> `define	ROM_SIZE2C	7'd010	// for future use
> `define	ROM_SIZE2D	7'd010	// for future use
> 
> `define	ROM_START0	7'h00	// Device Descriptor Start Address
> `define	ROM_START1	7'h12	// Configuration Descriptor Start Address
> `define	ROM_START2A	7'h32	// Language ID Descriptor Start Address
> `define	ROM_START2B	7'h36	// String Descriptor Start Address
> `define	ROM_START2C	7'h40	// for future use
> `define	ROM_START2D	7'h4a	// for future use
> 
> 
> section from usb1_rom.v:
> 
> 		// ====================================
> 		// ===== String Descriptor Lang ID=====
> 		// ====================================
> 
> 	   7'h32:	dout <= #1 8'd04;	// this descriptor length IT SHOULD READ 
> THE LANG IDS STARTING HERE
> 	   7'h33:	dout <= #1 8'd03;	// descriptor type
> 
> 	   7'h34:	dout <= #1 8'd09;	// Language ID 0 low byte
> 	   7'h35:	dout <= #1 8'd04;	// Language ID 0 high byte
> 
> 
> 		// ====================================
> 		// =====   String Descriptor 0    =====
> 		// ====================================
> 
> 	   7'h36:	dout <= #1 8'd020;	// this descriptor length
> 	   7'h37:	dout <= #1 8'd03;	// descriptor type
> 	   7'h38:	dout <= #1 "0";
> 	   7'h39:	dout <= #1 " ";
> 	   7'h3a:	dout <= #1 "g";
> 	   7'h3b:	dout <= #1 "n";
> 	   7'h3c:	dout <= #1 "i";
> 	   7'h3d:	dout <= #1 8'd04;
> 	   7'h3e:	dout <= #1 8'd03;
> 	   7'h3f:	dout <= #1 8'd09;
> 
> 		// ====================================
> 		// =====   String Descriptor 1    =====
> 		// ====================================
> 
> 	   7'h40:	dout <= #1 8'd04;	// this descriptor length
> 	   7'h41:	dout <= #1 8'd03;	// descriptor type
> 	   7'h42:	dout <= #1 "1";
> 	   7'h43:	dout <= #1 " ";
> 	   7'h44:	dout <= #1 "g";
> 	   7'h45:	dout <= #1 "n";
> 	   7'h46:	dout <= #1 "i";
> 	   7'h47:	dout <= #1 8'd04; // BUT IT ACTUALLY READS THE LANGUAGE ID 
> TABLE STARTING HERE
> 	   7'h48:	dout <= #1 8'd03;
> 	   7'h49:	dout <= #1 8'd09;
> 
> 		// ====================================
> 		// =====   String Descriptor 2    =====
> 		// ====================================
> 
> 	   7'h4a:	dout <= #1 8'd04;	// this descriptor length
> 	   7'h4b:	dout <= #1 8'd03;	// descriptor type
> 	   7'h4c:	dout <= #1 "2";
> 	   7'h4d:	dout <= #1 " ";
> 	   7'h4e:	dout <= #1 "g";
> 	   7'h4f:	dout <= #1 "n";
> 	   7'h50:	dout <= #1 "i";
> 	   7'h51:	dout <= #1 8'h51;
> 	   7'h52:	dout <= #1 "t";
> 	   7'h53:	dout <= #1 "S";
> 


I just looked at the original code. In the original code,
the beginning of the Language ID descriptor is at ROM
address 8'h47:

`define	ROM_SIZE0	7'd018	// Device Descriptor Length
`define	ROM_SIZE1	7'd053	// Configuration Descriptor Length
`define	ROM_SIZE2A	7'd004	// Language ID Descriptor Start Length
`define	ROM_SIZE2B	7'd010	// String Descriptor Length
`define	ROM_SIZE2C	7'd010	// for future use
`define	ROM_SIZE2D	7'd010	// for future use

`define	ROM_START0	7'h00	// Device Descriptor Start Address
`define	ROM_START1	7'h12	// Configuration Descriptor Start Address
`define	ROM_START2A	7'h47	// Language ID Descriptor Start Address 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**********************************************************************

`define	ROM_START2B	7'h50	// String Descriptor Start Address
`define	ROM_START2C	7'h60	// for future use
`define	ROM_START2D	7'h70	// for future use

Could it be that you made the modifications in a different
file that you are using for the actual compile or are you
not recompiling from scratch ???

Take a look at usb1_defines.v ...

Pay close attention to any warning you might get from your
synthesis tool ...

Regards,
rudi               
--------------------------------------------------------
www.asics.ws  --- Solutions for your ASIC/FPGA needs ---
----------------- FPGAs * Full Custom ICs * IP Cores ---
FREE IP Cores --> http://www.asics.ws/ <-- FREE IP Cores

--
To unsubscribe from usb mailing list please visit http://www.opencores.org/mailinglists.shtml