Changeset 0d523ca in rtems
- Timestamp:
- 11/17/99 15:36:57 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 23d9392f
- Parents:
- 2d8a4ed0
- Location:
- tools/cpu/sh
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/cpu/sh/COPYING
r2d8a4ed0 r0d523ca 2 2 shgen - code generator for the Hitachi SH microcontroller family 3 3 4 Copyright (C) 1998 Ralf Corsepius (corsepiu@faw.uni-ulm.de)4 Copyright (C) 1998-1999 Ralf Corsepius (corsepiu@faw.uni-ulm.de) 5 5 6 6 This program is free software; you can redistribute it and/or modify -
tools/cpu/sh/sci.c
r2d8a4ed0 r0d523ca 68 68 ( ( Phi / ( (entry->N + 1) * a ) - 1.0 ) * 100.0 ); 69 69 else 70 { 70 71 entry->err = 100.0 ; 72 entry->n = 255 ; 73 entry->N = 0 ; 74 } 71 75 } 72 76 … … 128 132 if ( i > 0 ) 129 133 fprintf( file, ",\n" ); 130 fprintf( file, " { %1d, %3d } /* %+7.2f%% ; B%d */",134 fprintf( file, " { %1d, %3d } /* %+7.2f%% ; B%d ", 131 135 best->n, 132 136 best->N, 133 137 best->err, 134 138 best->B ); 139 if ( best->n > 3 ) 140 fprintf( file, "(unusable) " ); 141 fprintf( file, "*/" ); 135 142 } 136 143 … … 148 155 " if ( offset == 0 ) return -1 ;\n" 149 156 " offset-- ;\n\n" 157 " if ( _sci_bitrates[offset].n > 3 ) return -1;\n\n" 150 158 " *smr &= ~0x03;\n" 151 159 " *smr |= _sci_bitrates[offset].n;\n" -
tools/cpu/sh/shgen.c
r2d8a4ed0 r0d523ca 1 1 /* 2 * Copyright (c) 1998 Ralf Corsepius (corsepiu@faw.uni-ulm.de)2 * Copyright (c) 1998-1999 Ralf Corsepius (corsepiu@faw.uni-ulm.de) 3 3 * 4 4 * See the file COPYING for copyright notice. … … 16 16 fprintf( stderr, "usage: %s [options] driver\n", prog ); 17 17 fprintf( stderr, "options:\n" ); 18 fprintf( stderr, "\t-M Phi .. processor frequency [MHz] default: 20\n" ); 18 fprintf( stderr, "\t-M Phi .. processor frequency [MHz]\n" ); 19 fprintf( stderr, "\t-K Phi .. processor frequency [KHz]\n" ); 20 fprintf( stderr, "\t-H Phi .. processor frequency [Hz]\n" ); 21 fprintf( stderr, "\t\t..default 20MHz" ); 19 22 fprintf( stderr, "driver:\n" ); 20 23 fprintf( stderr, "\tsci .. bitrate table for sci\n" ); … … 25 28 { 26 29 fprintf( file, 27 "/*\n * DO NOT EDIT - this file is automatically generated by shgen 0. 2\n" );30 "/*\n * DO NOT EDIT - this file is automatically generated by shgen 0.3\n" ); 28 31 fprintf( file, 29 " * Copyright (c) 1998 , Ralf Corsepius (corsepiu@faw.uni-ulm.de)\n */\n" );32 " * Copyright (c) 1998-1999, Ralf Corsepius (corsepiu@faw.uni-ulm.de)\n */\n" ); 30 33 fprintf( file, 31 34 "\n/* This file is not copyrighted */\n\n" ); … … 36 39 double Phi = 20.0 ; 37 40 38 while ( ( optopt = getopt( argc, argv, "M: " ) ) > 0 )41 while ( ( optopt = getopt( argc, argv, "M:K:H:" ) ) > 0 ) 39 42 { 40 43 switch ( optopt ) … … 43 46 sscanf( optarg, "%lf", &Phi ); 44 47 Phi = Phi * 1000000.0; 48 break ; 49 case 'K' : 50 sscanf( optarg, "%lf", &Phi ); 51 Phi = Phi * 1000.0; 52 break ; 53 case 'H' : 54 sscanf( optarg, "%lf", &Phi ); 45 55 break ; 46 56 default :
Note: See TracChangeset
for help on using the changeset viewer.