Last change
on this file since 248 was 2, checked in by Rick van der Zwet, 15 years ago |
Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)
|
File size:
1.1 KB
|
Rev | Line | |
---|
[2] | 1 | /* Author : Rick van der Zwet
|
---|
| 2 | * S-number : 0433373
|
---|
| 3 | * Version : $Id: memory.h 363 2007-12-03 06:07:31Z rick $
|
---|
| 4 | * Copyright : FreeBSD Licence
|
---|
| 5 | * Description : Computation main
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #include <stdio.h>
|
---|
| 9 | #include <stdlib.h>
|
---|
| 10 | #include <sysexits.h>
|
---|
| 11 | #include <string.h>
|
---|
| 12 |
|
---|
| 13 | #include "memory_std.h"
|
---|
| 14 | #include "memory_bank.h"
|
---|
| 15 | #include "memory_dram.h"
|
---|
| 16 |
|
---|
| 17 | void
|
---|
| 18 | usage(char *argv[])
|
---|
| 19 | {
|
---|
| 20 | fprintf(stderr, "%s <mem_combination>\n", argv[0]);
|
---|
| 21 | fprintf(stderr, "<mem_combination> = [12345]\n");
|
---|
| 22 |
|
---|
| 23 | exit(EX_USAGE);
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | int
|
---|
| 28 | main(int argc, char *argv[])
|
---|
| 29 | {
|
---|
| 30 |
|
---|
| 31 | if (argc < 2)
|
---|
| 32 | usage(argv);
|
---|
| 33 |
|
---|
| 34 | switch (argv[1][0]) {
|
---|
| 35 | case '1':
|
---|
| 36 | memory_std(8);
|
---|
| 37 | break;
|
---|
| 38 | case '2':
|
---|
| 39 | memory_bank(4, 8);
|
---|
| 40 | break;
|
---|
| 41 | case '3':
|
---|
| 42 | memory_bank(8, 8);
|
---|
| 43 | break;
|
---|
| 44 | case '4':
|
---|
| 45 | memory_dram(64, 3, 8);
|
---|
| 46 | break;
|
---|
| 47 | case '5':
|
---|
| 48 | memory_dram(1024, 2, 8);
|
---|
| 49 | break;
|
---|
| 50 | default:
|
---|
| 51 | fprintf(stderr, "Argument invalid: '%s'\n", argv[1]);
|
---|
| 52 | usage(argv);
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | exit(EX_OK);
|
---|
| 56 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.