Changeset 0d523ca in rtems for tools


Ignore:
Timestamp:
Nov 17, 1999, 3:36:57 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
23d9392
Parents:
2d8a4ed0
Message:

Patch rtems-rc-19991105-2.diff from Ralf Corsepius <corsepiu@…>.
His comments follow:

This is a minor enhancement to shgen, which should not have any
side-effects.

Location:
tools/cpu/sh
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tools/cpu/sh/COPYING

    r2d8a4ed0 r0d523ca  
    22    shgen - code generator for the Hitachi SH microcontroller family
    33
    4     Copyright (C) 1998 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
     4    Copyright (C) 1998-1999 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
    55
    66    This program is free software; you can redistribute it and/or modify
  • tools/cpu/sh/sci.c

    r2d8a4ed0 r0d523ca  
    6868      ( ( Phi / ( (entry->N + 1) * a ) - 1.0 ) * 100.0 );
    6969  else
     70  {
    7071    entry->err = 100.0 ;
     72    entry->n = 255 ;
     73    entry->N = 0 ;
     74  }
    7175}
    7276
     
    128132    if ( i > 0 )
    129133      fprintf( file, ",\n" );
    130     fprintf( file, "  { %1d, %3d } /* %+7.2f%% ; B%d */",
     134    fprintf( file, "  { %1d, %3d } /* %+7.2f%% ; B%d ",
    131135      best->n,
    132136      best->N,
    133137      best->err,
    134138      best->B );
     139    if ( best->n > 3 )
     140      fprintf( file, "(unusable) " );
     141    fprintf( file, "*/" );
    135142  }
    136143
     
    148155    "  if ( offset == 0 ) return -1 ;\n"
    149156    "  offset-- ;\n\n"
     157    "  if ( _sci_bitrates[offset].n > 3 )  return -1;\n\n"
    150158    "  *smr &= ~0x03;\n"
    151159    "  *smr |= _sci_bitrates[offset].n;\n"
  • tools/cpu/sh/shgen.c

    r2d8a4ed0 r0d523ca  
    11/*
    2  * Copyright (c) 1998 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
     2 * Copyright (c) 1998-1999 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
    33 *
    44 * See the file COPYING for copyright notice.
     
    1616  fprintf( stderr, "usage: %s [options] driver\n", prog );
    1717  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" );
    1922  fprintf( stderr, "driver:\n" );
    2023  fprintf( stderr, "\tsci .. bitrate table for sci\n" );
     
    2528{
    2629  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" );
    2831  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" );
    3033  fprintf( file,
    3134    "\n/* This file is not copyrighted */\n\n" );
     
    3639  double        Phi = 20.0 ;
    3740 
    38   while ( ( optopt = getopt( argc, argv, "M:" ) ) > 0 )
     41  while ( ( optopt = getopt( argc, argv, "M:K:H:" ) ) > 0 )
    3942  {
    4043    switch ( optopt )
     
    4346      sscanf( optarg, "%lf", &Phi );
    4447      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 );
    4555      break ;
    4656    default  :
Note: See TracChangeset for help on using the changeset viewer.