Deleted Added
sdiff udiff text old ( 3943:68e673d2db04 ) new ( 3990:6a5fd06c76a0 )
full compact
1/*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 37 unchanged lines hidden (view full) ---

46#include "sim/system.hh"
47
48using namespace std;
49using namespace TheISA;
50
51DumbTOD::DumbTOD(Params *p)
52 : BasicPioDevice(p)
53{
54 pioSize = 0x08;
55
56 struct tm tm;
57 parseTime(p->init_time, &tm);
58 todTime = timegm(&tm);
59
60 DPRINTFN("Real-time clock set to %s\n", asctime(&tm));
61 DPRINTFN("Real-time clock set to %d\n", todTime);
62}
63
64Tick
65DumbTOD::read(PacketPtr pkt)
66{

--- 10 unchanged lines hidden (view full) ---

77}
78
79Tick
80DumbTOD::write(PacketPtr pkt)
81{
82 panic("Dumb tod device doesn't support writes\n");
83}
84
85BEGIN_DECLARE_SIM_OBJECT_PARAMS(DumbTOD)
86
87 Param<Addr> pio_addr;
88 Param<Tick> pio_latency;
89 SimObjectParam<Platform *> platform;
90 SimObjectParam<System *> system;
91 VectorParam<int> time;
92

--- 25 unchanged lines hidden ---