URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc
- from Rev 44 to Rev 45
- ↔ Reverse comparison
Rev 44 → Rev 45
/trunk/or_debug_proxy/src/usb_functions.c
369,6 → 369,7
int retry_do() { |
|
unsigned char stalled; |
int tap_id_reads = 0; |
|
//printf("RETRY\n"); |
if (retry_no == 0) |
391,7 → 392,7
*/ |
|
// Try a readback of the TAP ID |
|
read_tap: |
// Set ID code instruction in IR |
usb_set_tap_ir(JI_IDCODE); |
|
403,10 → 404,19
|
if((id&0xffffffff) != (id_read_at_reset&0xffffffff)) |
{ |
// Pretty big problem - can't even read the ID of the TAP anymore |
// So return error |
printf("Unable to read JTAG TAP ID - read %08x, expected %08x\n", id, id_read_at_reset); |
return 1; |
if (tap_id_reads == 10) |
{ |
// Pretty big problem - can't even read the ID of the TAP anymore |
// So return error |
printf("Unable to read JTAG TAP ID - read %08x, expected %08x\n", |
id, id_read_at_reset); |
|
return 1; |
} |
|
tap_id_reads++; |
|
goto read_tap; |
} |
|
current_chain = -1; |
/trunk/orpsocv2/sw/eth/eth-int.c
66,12 → 66,6
void trap_except(){} |
void res2_except(){} |
|
/* Exception efective address */ |
volatile unsigned long except_ea; |
|
/* Eception PC */ |
volatile unsigned long except_pc; |
|
volatile unsigned tx_done; |
|
/* Functions in this file */ |
/trunk/orpsocv2/sw/eth/except.S
63,16 → 63,6
l.jal store_regs |
l.nop |
|
l.mfspr r3,r0,SPR_EPCR_BASE |
l.movhi r4,hi(_except_pc) |
l.ori r4,r4,lo(_except_pc) |
l.sw 0(r4),r3 |
|
l.mfspr r3,r0,SPR_EEAR_BASE |
l.movhi r4,hi(_except_ea) |
l.ori r4,r4,lo(_except_ea) |
l.sw 0(r4),r3 |
|
l.movhi r9,hi(end_except) |
l.ori r9,r9,lo(end_except) |
l.movhi r10,hi(_excpt_int) |
/trunk/orpsocv2/sw/utils/bin2vmem.c
51,10 → 51,23
// @0000000c 00000000 00000000 00000000 00000000 |
// etc.. |
// |
// OR |
// |
// Output a list of the words, one per line, as Synplify appears to like |
// specify this option with the -synfmt switch on the command line after |
// the input file |
// eg: ./bin2vmem data.bin -synfmt > data.vmem |
// |
|
#define WORDS_PER_LINE 4 |
#define BYTES_PER_WORD 4 |
|
#define FILENAME_CMDLINE_INDEX 1 |
#define FMT_CMDLINE_INDEX 2 |
|
#define FMT_WITH_ADDR 0 |
#define FMT_SYN 1 |
|
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
66,8 → 79,8
int c; |
int i = 0; |
int write_size_word=0; // Disabled by default |
int filename_index=1; |
unsigned int image_size; |
int output_fmt = FMT_WITH_ADDR; // 0 - standard 4 per line with address, 1 - synfmt |
|
// Counters keeping track of what we've printed |
int current_addr = 0; |
78,11 → 91,23
fprintf(stderr,"\n\tInsufficient options.\n"); |
fprintf(stderr,"\tPlease specify a binary file to convert to VMEM\n"); |
fprintf(stderr,"\n\tbin2vmem - creates vmem output to stdout from bin\n"); |
fprintf(stderr,"\n\tBy default the output is word addressed 32-bit words\n"); |
fprintf(stderr,"\tSpecify -synfmt on the command line after the filename\n"); |
fprintf(stderr,"\tto output in the alterative format, which is a simple\n"); |
fprintf(stderr,"\tlist of the data words.\n"); |
|
fprintf(stderr,"\n"); |
exit(1); |
} |
|
fd = fopen( argv[filename_index], "r" ); |
|
fd = fopen( argv[FILENAME_CMDLINE_INDEX], "r" ); |
|
if (argc > 2) // check for the -synfmt switch |
{ |
if (strcmp("-synfmt", argv[FMT_CMDLINE_INDEX]) == 0) |
output_fmt = FMT_SYN; // synthesis friendly format - single column, no addr |
} |
|
if (fd == NULL) { |
fprintf(stderr,"failed to open input file: %s\n",argv[1]); |
exit(1); |
115,45 → 140,64
printf("%8x", image_size); |
current_addr += WORDS_PER_LINE * BYTES_PER_WORD; |
} |
else |
{ |
} |
|
|
// Fix for the current bootloader software! Skip the first 4 bytes of application data. Hopefully it's not important. 030509 -- jb |
// Fix for the current bootloader software! Skip the first 4 |
// bytes of application data. Hopefully it's not important. 030509 -- jb |
//for(i=0;i<4;i++) |
// c=fgetc(fd); |
i=0; |
int starting_new_line = 1; |
// Now write out the binary data to VMEM format: @ADDRESSS XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX |
// Now write out the binary data to specified format. Either |
// more complicated, addressed format: |
// VMEM format: @ADDRESSS XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX |
// or simple, synplifyfriendly format which is just a list of |
// the words |
|
while ((c = fgetc(fd)) != EOF) { |
if (starting_new_line) |
{ |
// New line - print the current addr and then increment it |
printf("@%.8x", current_addr); |
//current_addr += WORDS_PER_LINE * BYTES_PER_WORD; |
current_addr += WORDS_PER_LINE; |
starting_new_line = 0; |
} |
if (byte_counter == 0) |
printf(" "); |
|
printf("%.2x", (unsigned int) c); // now print the actual char |
|
byte_counter++; |
|
if (byte_counter == BYTES_PER_WORD) |
if (output_fmt == FMT_WITH_ADDR) // Default format |
{ |
word_counter++; |
byte_counter=0; |
} |
if (word_counter == WORDS_PER_LINE) |
|
if (starting_new_line) |
{ |
// New line - print the current addr and then increment it |
printf("@%.8x", current_addr); |
current_addr += WORDS_PER_LINE; |
starting_new_line = 0; |
} |
if (byte_counter == 0) |
printf(" "); |
|
printf("%.2x", (unsigned int) c); // now print the actual char |
|
byte_counter++; |
|
if (byte_counter == BYTES_PER_WORD) |
{ |
word_counter++; |
byte_counter=0; |
} |
if (word_counter == WORDS_PER_LINE) |
{ |
printf("\n"); |
word_counter = 0; |
starting_new_line = 1; |
} |
} // End of FMT_WITH_ADDR |
else if (output_fmt == FMT_SYN) // simple list of data words |
{ |
printf("\n"); |
word_counter = 0; |
starting_new_line = 1; |
printf("%.2x", (unsigned int) c); // now print the actual char |
byte_counter++; |
if (byte_counter == BYTES_PER_WORD) |
{ |
printf("\n"); |
byte_counter=0; |
} |
} |
|
|
} |
|
|
return 0; |
} |
/trunk/toolchain_install_scripts/MOF_ORSOC_TCHN_v5c_or32-elf.sh
112,14 → 112,16
echo |
echo "Please report this to the script maintainers." |
echo |
echo "A useful report would contain information such as the module" |
echo "buing built/\"make\"ed when the error occurred (relevant lines" |
echo "of console output), the version of GCC on the host system used" |
echo "to compile (gcc --version), linux distro and version, etc." |
echo "A good place to post this information is on the OpenCores" |
echo "forum for the OpenRISC project: " |
echo "http://opencores.org/?do=forum" |
echo "A useful report would contain information such as the tool" |
echo "being built/\"make\"d when the error occurred and the relevant" |
echo "lines of console output or log file relating to the error. It" |
echo "also helps to include information about your the host OS and" |
echo "version of GCC." |
echo "A good place to look for solutions, and report any bugs, is at" |
echo "the OpenRISC project's bug tracker on OpenCores.org:" |
echo |
echo " http://opencores.org/openrisc,bugtracker" |
echo |
exit $? |
fi |
} |