100% found this document useful (11 votes)
62 views77 pages

Systemc From The Ground Up 1St Edition by David Black, Jack Donovan Isbn 9780387308647 038730864X

The document promotes the book 'SystemC From the Ground Up' by David Black and Jack Donovan, providing details on its content, structure, and prerequisites for readers. It also includes links to download the book and other recommended texts on various topics. The book aims to help readers master the SystemC language for system design and simulation modeling.

Uploaded by

betecksookna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (11 votes)
62 views77 pages

Systemc From The Ground Up 1St Edition by David Black, Jack Donovan Isbn 9780387308647 038730864X

The document promotes the book 'SystemC From the Ground Up' by David Black and Jack Donovan, providing details on its content, structure, and prerequisites for readers. It also includes links to download the book and other recommended texts on various topics. The book aims to help readers master the SystemC language for system design and simulation modeling.

Uploaded by

betecksookna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

Visit ebookball.

com to download the full version and


explore more ebook or textbook

SystemC From the Ground Up 1st Edition by David


Black, Jack Donovan ISBN 9780387308647 038730864X

_____ Click the link below to download _____


https://ebookball.com/product/systemc-from-the-ground-
up-1st-edition-by-david-black-jack-donovan-
isbn-9780387308647-038730864x-19866/

Explore and download more ebook or textbook at ebookball.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Blockchain Security From the Bottom Up Securing and


Preventing Attacks on Cryptocurrencies Decentralized
Applications NFTs and Smart Contracts 1st edition by
Howard Poston 9781119898634 1119898633
https://ebookball.com/product/blockchain-security-from-the-bottom-up-
securing-and-preventing-attacks-on-cryptocurrencies-decentralized-
applications-nfts-and-smart-contracts-1st-edition-by-howard-
poston-9781119898634-1119898633-187/

Diversity and Inclusion in the Start-Up Ecosystem

https://ebookball.com/product/diversity-and-inclusion-in-the-start-up-
ecosystem-24752/

Sports Cardiology Care of the Athletic Heart from the


Clinic to the Sidelines 1st Edition by David Engel, Dermot
Phelan ISBN 9783030693848 3030693848
https://ebookball.com/product/sports-cardiology-care-of-the-athletic-
heart-from-the-clinic-to-the-sidelines-1st-edition-by-david-engel-
dermot-phelan-isbn-9783030693848-3030693848-4668/

Spirituality in Nursing Standing on Holy Ground 1st


Edition by Mary Elizabeth OBrien ISBN 0763706442
9780763706449
https://ebookball.com/product/spirituality-in-nursing-standing-on-
holy-ground-1st-edition-by-mary-elizabeth-obrien-
isbn-0763706442-9780763706449-562/
Selected Chapters From Evolutionary Psychology The New
Science of the Mind 3rd Edition by David Buss 0205483380
978-0205483389
https://ebookball.com/product/selected-chapters-from-evolutionary-
psychology-the-new-science-of-the-mind-3rd-edition-by-david-
buss-0205483380-978-0205483389-23980/

Selected Chapters From Evolutionary Psychology The New


Science of the Mind 5th Edition by David Buss 0205992129
978-0205992126
https://ebookball.com/product/selected-chapters-from-evolutionary-
psychology-the-new-science-of-the-mind-5th-edition-by-david-
buss-0205992129-978-0205992126-23986/

Spirituality in Nursing Standing on Holy Ground 4th


Edition by Mary Elizabeth OBrien ISBN 0763796506
9780763796501
https://ebookball.com/product/spirituality-in-nursing-standing-on-
holy-ground-4th-edition-by-mary-elizabeth-obrien-
isbn-0763796506-9780763796501-564/

When Broken Glass Floats Growing Up Under the Khmer Rouge


1st edition by Chanrithy Him ISBN 0393322106
978-0393322101
https://ebookball.com/product/when-broken-glass-floats-growing-up-
under-the-khmer-rouge-1st-edition-by-chanrithy-him-
isbn-0393322106-978-0393322101-12056/

Bionanotechnology Lessons From Nature 1st Edition by David


Goodsell 047141719X 9780471417194

https://ebookball.com/product/bionanotechnology-lessons-from-
nature-1st-edition-by-david-goodsell-047141719x-9780471417194-13002/
SYSTEMC: FROM THE GROUND UP
This page intentionally left blank
SYSTEMC: FROM THE GROUND UP

By

David C. Black and Jack Donovan


Eklectic Ally, Inc.

KLUWER ACADEMIC PUBLISHERS


NEW YORK, BOSTON, DORDRECHT, LONDON, MOSCOW
eBook ISBN: 1-4020-7989-3
Print ISBN: 1-4020-7988-5

©2004 Kluwer Academic Publishers


New York, Boston, Dordrecht, London, Moscow

Print ©2004 Kluwer Academic Publishers


Boston

All rights reserved

No part of this eBook may be reproduced or transmitted in any form or by any means, electronic,
mechanical, recording, or otherwise, without written consent from the Publisher

Created in the United States of America

Visit Kluwer Online at: http://kluweronline.com


and Kluwer's eBookstore at: http://ebooks.kluweronline.com
Dedication

This book is dedicated to our spouses


Pamela Black and Carol Donovan,
and to our children
Christina, Loretta, & William Black,
Chris, Karen, Jenny, & Becca Donovan
This page intentionally left blank
Contents

Dedication v

Preface xi
Why this Book xi
Prerequisites for this Book xii
Book Conventions xiii
About the Examples xiv
How to Use this Book xiv
SystemC Background xv
The Evolution of SystemC xv
Open SystemC Initiative xvii

1. An Overview to System Design Using SystemC 1


1.1 Introduction 1
1.2 Language Comparison 2
1.3 Design Methods 3
1.4 What’s Next 3
1.5 Enhancing Productivity with SystemC 3

2. TLM-Based Methodology 11
2.1 Transaction-Level Modeling Overview 11
2.2 Abstraction Models 13
2.3 Another Look at Abstraction Models 15
2.4 TLM-Based Methodology 16
2.5 Summary 23
viii SystemC: From The Ground Up

3. Overview of SystemC 25
3.1 C++ Mechanics for SystemC 26
3.2 SystemC: A C++ Class for Hardware 30
3.3 Overview of SystemC Components 33
3.4 SystemC Simulation Kernel 38

4. Data Types 41
4.1 Numeric Representation 41
4.2 Native Data Types 43
4.3 Arithmetic Data Types 43
4.4 Boolean and Multi-Value Data Types 45
4.5 Fixed-Point Data Types 47
4.6 Operators for SystemC Data Types 51
4.7 Higher Levels of Abstraction and the STL 52
4.8 Choosing the Right Data Type 55
4.9 Exercises 56

5. Modules 57
5.1 A Starting Point: sc_main 57
5.2 The Basic Unit of Design: SC_MODULE 59
5.3 The SC_MODULE Class Constructor: SC_CTOR 60
5.4 The Basic Unit of Execution: SystemC Process 61
5.5 Registering the Simple Process: SC_THREAD 62
5.6 Completing the Simple Design: main.cpp 64
5.7 Alternative Constructors: SC_HAS_PROCESS 64
5.8 Two Basic Styles 66
5.9 Exercises 70

6. A Notion of Time 71
6.1 sc_time 71
6.2 sc_start() 72
6.3 sc_time_stamp () and Time Display 73
6.4 wait(sc_time) 74
6.5 sc_simulation_time(), Time Resolution and Time Units 75
6.6 Exercises 76

7. Concurrency 77
7.1 sc_event 78
7.2 Simplified Simulation Engine 79
7.3 SC_THREAD 81
7.4 Dynamic Sensitivity for SC_THREAD::wait() 81
7.5 Another Look at Concurrency and Time 83
7.6 Triggering Events: .notify() 86
Contents ix

7.7 SC_METHOD 90
7.8 Dynamic Sensitivity for SC_METHOD: next_trigger() 92
7.9 Static Sensitivity for Processes 93
7.10 dont_initialize 96
7.11 sc_event_queue 97
7.12 Exercises 98

8. Basic Channels 99
8.1 Primitive Channels 100
8.2 sc_mutex 100
8.3 sc_semaphore 102
8.4 sc_fifo 104
8.5 Exercises 107

9. Evaluate-Update Channels 109


9.1 Completed Simulation Engine 111
9.2 sc_signal, sc_buffer 113
9.3 sc_signal_resolved, sc_signal_rv 116
9.4 Template Specializations of sc_signal Channels 118
9.5 Exercises 120

10. Structure 121


10.1 Module Hierarchy 121
10.2 Direct Top-Level Implementation 123
10.3 Indirect Top-Level Implementation 124
10.4 Direct Sub-Module Header-Only Implementation 125
10.5 Indirect Sub-Module Header-Only Implementation 125
10.6 Direct Sub-Module Implementation 126
10.7 Indirect Sub-Module Implementation 127
10.8 Contrasting Implementation Approaches 128
10.9 Exercises 128

11. Communication 129


11.1 Communication: The Need for Ports 129
11.2 Interfaces: C++ and SystemC 130
11.3 Simple SystemC Port Declarations 135
11.4 Many Ways to Connect 136
11.5 Port Connection Mechanics 138
11.6 Accessing Ports From Within a Process 141
11.7 Exercises 142
x SystemC: From The Ground Up

12. More on Ports 143


12.1 Standard Interfaces 143
12.2 Static Sensitivity Revisited 147
12.3 Specialized Ports 149
12.4 The sc_port<> Array 154
12.5 SystemC Exports 158
12.6 Connectivity Revisited 164
12.7 Exercises 166

13. Custom Channels and Data 167


13.1 A Review of Channels and Interfaces 167
13.2 The Interrupt, a Custom Primitive Channel 168
13.3 The Packet, a Custom Data Type for SystemC 170
13.4 The Heartbeat, a Custom Hierarchical Channel 174
13.5 The Adaptor, a Custom Primitive Channel 176
13.6 The Transactor, a Custom Hierarchical Channel 180
13.7 Exercises 186

14. Advanced Topics 187


14.1 sc_clock, Predefined Processes 187
14.2 Clocked Threads, the SC_CTHREAD 189
14.3 Programmable Hierarchy 193
14.4 Debugging and Signal Tracing 197
14.5 Dynamic Processes 199
14.6 SC_FORK/SC_JOIN 204
14.7 Error and Message Reporting 207
14.8 Other Libraries: SCV, ArchC, and Boost 211
14.9 Exercises 212

15. Odds & Ends 213


15.1 Determinants in Simulation Performance 213
15.2 Features of the SystemC Landscape 218
15.3 Next Steps 222

Acknowledgments 227

List of Figures 229

Notes 237

Index 239
Preface

Why this Book

The first question any reader should ask is “Why this book?” We decided
to write this book after learning SystemC and after using minimal documents
to help us through the quest of becoming comfortable with the language’s
finer points. After teaching several SystemC classes, we were even more
convinced that an introductory book focused on the SystemC language was
needed. We decided to contribute such a book.
This book is about SystemC. It focuses on enabling the reader to master
the language. The reader will be introduced to the syntax and structure of the
language, and the reader will also learn about the features and usage of
SystemC that makes it a tool to shorten the development cycle of large
system designs.
We allude to system design techniques and methods by way of examples
throughout the book. Several books that discuss system-level design
methodology are available, and we believe that SystemC is ideally suited to
implement many of these methods. After reading this resource, the reader
should not only be adept at using SystemC constructs efficiently, but also
have an appreciation of how the constructs work together and how they can
be used to create high performance simulation models.
We believe there is enough information to convey about the SystemC
language to justify this stand-alone book. We hope you agree. We also
believe that there is enough material for a second book that focuses on using
SystemC to implement these system-level design methods. With reader
xii SystemC: From The Ground Up

encouragement, the authors hope to start on a second book that delves


deeper into the application of the language (after recovering from the writing
of this book).

Prerequisites for this Book

As with every technical book, the authors must write the content
assuming a basic level of understanding; this assumption avoids repeating
most of an engineering undergraduate curriculum. For this book, we
assumed that the reader has a working knowledge of C++ and minimal
knowledge of hardware design.
For C++ skills, we do not assume that the reader is a “wizard”. Instead,
we assumed that you have a good knowledge of the syntax, the object-
oriented features, and the methods of using C++. The authors have found
that this level of C++ knowledge is universal to current or recent graduates
with a computer science or engineering degree from a four-year university.
Interestingly, the authors have also found that this level of knowledge is
lacking for most ASIC designers with 10 or more years of experience. For
those readers, assimilating this content will be quite a challenge but not an
impossible one.
For readers without any understanding of C++ or for those who may be
rusty, we recommend finding a good C++ class at a community college or
taking advantage of many of the online tutorials. For a list of sources, see
Chapter 15. We find (from our own experience) that those who have learned
several procedural languages (like FORTRAN or PL/I) greatly
underestimate the difficulty of learning a modern object-oriented language.
To understand the examples completely, the reader will need minimal
understanding of digital electronics.
Preface xiii

Book Conventions

Throughout this book, we include many syntax and code examples.


We’ve chosen to use an example-based approach because most engineers
have an easier time understanding examples rather than strict Backus-Naur
Form1 (BNF) syntax or precise library declarations. Syntax examples
illustrate the code in the manner it may be seen in real use with placeholders
for user-specified items. For more complete library information, we refer the
reader to the SystemC Language Reference Manual (LRM) currently at
version 2.0.1, which you can download from www.systemc.org.
Code will appear in monotype Courier font. Keywords for both
C/C++ and SystemC will be shown in bold. User-selectable syntax items
are in italics for emphasis. Repeated items may be indicated with an
ellipsis (…) or subscripts. The following is an example:

wait(name.posedge_event()|eventi...);
if (name.posedge()) { //previous delta-cycle
//ACTIONS...

Figure 1. Example of Sample Code

In addition, the following are standard graphical notations. The


terminology will be presented as the book progresses.

1
John Backus and Peter Naur first introduced BNF as a formal notation to describe the syntax
of a given language. NAUR, Peter (ed.), “Revised Report on the Algorithmic Language
ALGOL 60.”, Communications of the ACM, Vol. 3 No.5, pp. 299-314, May 1960
xiv SystemC: From The Ground Up

SystemC uses a naming convention where most SystemC specific


identifiers are prefixed with sc_ or SC_. This convention is reserved for the
SystemC library, and you should not use it in end-user code (your code).

About the Examples

To introduce the syntax of SystemC and demonstrate its usage, we have


filled this book with examples. Most examples are not real-world examples.
Real examples just become too cluttered too fast. The goal of these examples
is to communicate concepts clearly; we hope that the reader can extend them
into the real world. For the most part, we used a common theme of an
automobile for the examples.
By convention, we show syntax examples stylistically as if SystemC is a
special language, which it is not. We hope that this presentation style will
help you apply SystemC on your first coding efforts. If you are looking for
the C++ declarations, please browse the LRM or look directly into the
SystemC Open SystemC Initiative reference source code
(www.systemc.org).

How to Use this Book

The authors designed this book primarily for the student or engineer new
to SystemC. This book’s structure is best appreciated by reading sequentially
from beginning to end. A reader already familiar with SystemC will find this
content to be a great reference.
Chapters 1 through 3 provide introductions and overviews of the
language and its usage. Methodology is briefly discussed.
For the student or engineer new to SystemC, the authors present the
language from the bottom up and explain the topics from a context of C++
with ties to hardware concepts. We provide exercises at the end of Chapters
4 through 14 to reinforce the concepts presented in the text. Chapter 15
backs up the basic language concepts with a discussion of areas to watch
when designing, writing, or using SystemC in a production environment.
Preface xv

For the student or engineer already familiar with SystemC, Chapters 4


through 11 will provide some interesting background and insights into the
language. You can either skip or read these early chapters lightly to pick up
more nuances of the language. The content here is not meant to be a
complete description of the language. For a thorough description, the reader
is referred to the SystemC LRM. Chapters 12 through 14 provide
intermediate to advanced material.
For the advanced reader, Chapter 15 provides performance tips and
information about gotchas and tidbits that may help with some of the day-to-
day usage of SystemC.
For the instructor, this book may provide part of an advanced
undergraduate class on simulation or augment a class on systems design.
In most of the examples presented in the book, the authors show code
fragments only so as to emphasize the points being made. Examples are
designed to illustrate specific concepts, and as such are toy examples to
simplify learning. Complete source code for all examples and exercises is
available for download from www.EklecticAlly.com/Book as a compressed
archive. You will need this book to make best use of these files.

SystemC Background

SystemC is a system design language based on C++. As with most design


languages, SystemC has evolved. Many times a brief overview of the history
of language will help answer the question “Why do it that way?” We include
a brief history of SystemC and the Open SystemC Initiative to help answer
these questions.

The Evolution of SystemC

SystemC is the result of the evolution of many concepts in the research


and commercial EDA communities. Many research groups and EDA
companies have contributed to the language. A timeline of SystemC is
included below.
xvi SystemC: From The Ground Up

SystemC started out as a very restrictive cycle-based simulator and “yet


another” RTL language. The language has evolved (or is evolving) to a true
system design language that includes both software and hardware concepts.
Although SystemC does not specifically support analog hardware or
mechanical components, there is no reason why these aspects of a system
cannot be modeled with SystemC constructs or with co-simulation
techniques.
Preface xvii

Open SystemC Initiative

Several of the organizations that contributed heavily to the language


development efforts realized very early that any new design language must
be open to the community and not be proprietary. As a result, the Open
SystemC Initiative (OSCI) was formed in 1999. OSCI was formed to:

Evolve and standardize the language


Facilitate communication among the language users and tool
vendors
Enable adoption
Provide the mechanics for open source development and
maintenance

The SystemC Verification Library

As you will learn while reading this book, SystemC consists of the
language and potential methodology-specific libraries. The authors view the
SystemC Verification (SCV) library as the most significant of these libraries.
This library adds support for modern high-level verification language
concepts such as constrained randomization, introspection, and transaction
recording. The first release of the SCV library occurred in December of
2003 after over a year of Beta testing.

Current Activities with OSCI

At present, the Open SystemC Initiative is involved with completing the


LRM and submitting it to the Institute of Electrical and Electronics
Engineers (IEEE) for standardization. Additionally, sub-committees are
studying such topics as synthesis subsets and formalizing terminology
concerning levels of abstraction.
This page intentionally left blank
Chapter 1

AN OVERVIEW TO SYSTEM DESIGN USING


SYSTEMC
1.1 Introduction

SystemC is a system design language that has evolved in response to a


pervasive need for a language that improves overall productivity for
designers of electronic systems. Typically, today’s systems contain
application-specific hardware and software. Furthermore, the hardware and
software are usually co-developed on a tight schedule, the systems have tight
real-time performance constraints, and thorough functional verification is
required to avoid expensive and sometimes catastrophic failures.
SystemC offers real productivity gains by letting engineers design both
the hardware and software components together as these components would
exist on the final system, but at a high level of abstraction. This higher level
of abstraction gives the design team a fundamental understanding early in
the design process of the intricacies and interactions of the entire system and
enables better system trade offs, better and earlier verification, and over all
productivity gains through reuse of early system models as executable
specifications.
2 SystemC: From The Ground Up

1.2 Language Comparison

Strictly speaking, SystemC is not a language, but rather a class library


within a well established language, C++. SystemC is not a panacea that will
solve every design productivity issue. However, when SystemC is coupled
with the SystemC Verification Library, it does provide in one language
many of the characteristics relevant to system design and modeling tasks that
are missing or scattered among the other languages. Additionally, SystemC
provides a common language for software and hardware, C++.
Several languages have emerged to address the various aspects of system
design. Although Ada and Java have proven their value, C/C++ is
predominately used today for embedded system software. The hardware
description languages (HDLs), VHDL and Verilog, are used for simulating
and synthesizing digital circuits. Vera and e are the languages of choice for
functional verification of complex application-specific integrated circuits
(ASICs). SystemVerilog is a new language that evolves the Verilog
language to address many hardware-oriented system design issues. Matlab
and several other tools and languages such as SPW and System Studio are
widely used for capturing system requirements and developing signal
processing algorithms.
Figure 1-1 highlights the application of these and other system design
languages. Each language occasionally finds use outside its primary domain,
as the overlaps in Figure 1-1 illustrate.
An Overview to System Design Using SystemC 3

1.3 Design Methods

Design methods surrounding SystemC are currently maturing and vary


widely. In the next few years, these methods will likely settle into a cohesive
design methodology (with a few variants among certain industry segments).
The resulting methodology will feel similar to the methodologies in use
today, but at higher levels of abstraction. To some, the concept of using one
unified language for hardware and software development appears
revolutionary, but this concept is clearly an evolutionary path for those who
frequently work in both domains.
Although tools and language constructs exist in SystemC to support
register-transfer-level (RTL) modeling and synthesis, a major reason for
using the language is to work at higher abstraction levels than RTL.
SystemC’s ability to model RTL designs enables support of design blocks
generated by higher level (behavioral or graphical entry) synthesis tools or to
support legacy design blocks.

1.4 What’s Next

Now that we have given you a map of where SystemC fits into the
modern design language landscape, we will discuss some motivation for
learning SystemC.
Unless a new language solves a problem that current languages do not
address, you have no practical reason for learning that language (other than
academic curiosity). The rest of this chapter will discuss the set of problems
that you need to address with new methodologies and the types of solutions
that SystemC is enabling. Understanding SystemC’s solutions should help
you understand some of the language trade offs that you may question when
you dive into language details presented in Chapter 3, SystemC Overview.

1.5 Enhancing Productivity with SystemC

The primary motivation for using SystemC is to attain the productivity


increases required to design modern electronic systems with their ever
increasing complexity. Without productivity advances, many new system
concepts will be impractical. In the next sections, we will examine system
complexity, methods for attacking this complexity, and SystemC-enabled
solutions.
4 SystemC: From The Ground Up

1.5.1 Increasing Design Complexity

The primary driver leading to the need for a new system design language
is the same that previously lead to the need for the current design languages:
increasing design complexity.
Modern electronic systems consist of many sub-systems and components,
but we will focus primarily on hardware, software, and algorithms. In
modern systems, each of these disciplines has become more complex.
Likewise, the interaction has become increasingly complex.
Interactions imply that trade offs between the domains are becoming
more important for meeting customer requirements. System development
teams find themselves asking questions like, “Should this function be
implemented in hardware, software, or with a better algorithm?” Systems are
so complex, just deriving specifications from customer requirements has
become a daunting task.
Figure 1-2 illustrates the complexity issues for hardware design in a large
system on a chip (SoC) design. The figure shows three sample designs from
three generations: yesterday, today (2003), and tomorrow. In reality,
tomorrow’s systems are being designed today. The bars for each generation
imply the code complexity for four common levels of abstraction associated
with system hardware design:

Architecture
Behavioral
RTL
Gates
An Overview to System Design Using SystemC 5

Today’s integrated circuits (ICs) often exceed 10 million gates, which


conservatively translates to one hundred thousand lines of RTL code.
Today’s designs are practical because of the methodologies that apply RTL
synthesis for automated generation of gates. Tomorrow’s ICs, which are
being designed today, will exceed one hundred million gates, or roughly one
million lines of RTL code, if written using today’s methodologies.
Notice that Figure 1-2 considers only a single integrated circuit. It does
not reflect the greater complexity of a system with several large chips (ASIC
or field-programmable gate array, FPGA) and gigabytes of application
software. Many stop-gap approaches are being applied, but the requirement
for a fundamentally new approach is clear.
6 SystemC: From The Ground Up

1.5.2 Facing Design Complexity

SystemC supports several techniques for addressing the complexity of


modern designs. Today’s design community uses several approaches for
attacking the complexity issues that come with complex system design:

Abstraction
Design reuse
Team discipline
Project reuse
Automation
Let’s look at each of these approaches in turn.

1.5.2.1 Abstraction
In the past, the primary technique for managing complexity for both the
software and hardware community has been to raise the level of abstraction
used for design. This approach will be the primary technique for the future
as well.
For software developers, the transition was from assembler code to
higher level languages like FORTAN and PL/I, and then to even more
abstract languages like Lisp, Ada, and multi-paradigm languages such as
C++. Today’s software practitioners grapple with a plethora of fifth-
generation languages as they strive to find the appropriate level of
abstraction, expressiveness, flexibility, and performance required to develop
and maintain modern systems. Modular programming, data hiding, object-
oriented design, generic programming, exception and constraint handling all
aim to manage complexity.
For the hardware community, the path started with polygon definitions
hand drawn on Mylar film. Gate-level design was enabled through a variety
of schematic capture tools and gate-level languages that appear very crude
by today’s standards. In the late 1980s, VHDL and Verilog enabled process-
independent ASIC simulation, documentation, and net list development, and
eventually RTL synthesis.
Unfortunately, the synthesizable RTL subsets of VHDL and Verilog
force hardware designers to specify behavior on every clock edge, which
offers less abstraction than C offers the software designer. While object-
oriented software design and C++ accelerated in the 1990s, EDA vendors
attempted to keep pace by offering behavioral synthesis tools that could
build circuits from more abstract VHDL and Verilog descriptions. For a
An Overview to System Design Using SystemC 7

variety of reasons, designers gave these tools a cool reception, and major
EDA vendors shifted their focus toward design reuse and meeting designer
productivity requirements.
As a result, the hardware community has not coherently raised the design
abstraction level beyond RTL for almost 20 years, and the community has
instead focused on design reuse, team discipline, and automation.

1.5.2.2 Design Reuse


Reuse has emerged as the dominant productivity technique for RTL and
software design. Many excellent books have been written on this subject2.
Reuse will continue to be a major component of any new methodology to
address increased complexity.
Platform-based design is an evolution of design reuse to higher levels of
abstraction. Instead of reusing lower levels of design, whole compute
platforms are now reused and programmed for specific applications3.
Many times, we refer to design reuse as external reuse to distinguish this
technique from project reuse discussed in a later section.

1.5.2.3 Team Discipline


When we refer to team discipline, we refer to the tools and techniques
used to bring productivity to each engineer and the interactions among
engineers. This area encompasses anything from revision control to written
specifications and other documentation to design and code reviews.
In the past, team discipline techniques have been mostly applied locally
and without coordination to the architecture, software, and hardware groups.
Furthermore, team discipline has been applied with uneven acceptance
among these groups. In a highly disciplined organization, the deliverables
for each group may be defined, but this level of discipline is still not the
norm. To face the complexity issues for next generation designs, team
discipline needs to be more evenly applied across all of the system design
disciplines, coordinated more closely, and augmented with more tools.
The Software Engineering Institute’s (SEI) Capability Maturity Model
(CMM) has contributed much to elevating the software development process
from an art to a science. The hardware community has embraced this notion
with the MORE (Measure of Reuse Excellence) grading system, but all

2
Keating, M., Bricaud, P. 2002. Reuse Methodology Manual for System-On-A-Chip Designs.
Norwell, Massachusetts: Kluwer Academic Publishers.
3
Chang, H., Cooke, L., Hunt, M., Martin, G., McNelly, A., Todd, L. 1999. Surviving the SOC
Revolution: A Guide to Platform-Based Design. Norwell, Massachusetts: Kluwer
Academic Publishers.
8 SystemC: From The Ground Up

system designers would do well to adopt similar philosophies across the


entire spectrum of system design.

1.5.2.4 Project Reuse


Project reuse is the term we use to describe code that is defined for a
project and is reused by others within the project or on the next project.
Engineers on the project may reuse the code at the original level of
abstraction, or they may refine the code to a new and lower level of
abstraction by adding design details. Project reuse will allow code developed
by the architecture group to be reused by the software group, hardware
functional verification group, and the hardware design group. We will
discuss the SystemC mechanism for project reuse, refinement with adaptors,
in the next chapter and in greater detail in Chapter 13, Custom Channels.

1.5.2.5 Automation
Another important method for tackling design complexity is design
process automation. The EDA industry has continually provided tools that
improve designer productivity, and will continue to do so.
This productivity comes with a price—both monetary and team
discipline. Most EDA tools come with coding guidelines to maximize tool
performance and engineer productivity. In particular, with the exponentially
increasing amount of RTL code required in modern systems, automatic code
generation will play an increasing role, and adherence to guidelines for the
code generation tools will be essential. Team discipline techniques go a long
way towards optimal leveraging of the EDA tools they use.
In addition to automatic code generation, automation written by the
development team (usually during unpaid overtime) has always been
necessary to some extent, and it will continue to be of prime importance for
system design flows.

1.5.3 SystemC and Methods to Attack Complexity

SystemC supports all of the complexity attacking methods just discussed


(or else we would not have included them in a book about SystemC).
SystemC efficiently supports all of these methods because it leverages C++.
One of SystemC’s greatest strengths is its ability to provide higher levels
of abstraction for all components of a design. Managing abstraction is the
strongest weapon in combating complexity.
C++ programmers have been applying design reuse and enforcing team
discipline for years by leveraging the features in C++ and other tools, and
they have been distributing their software with high quality to a wide
An Overview to System Design Using SystemC 9

number of compute platforms. A great example is the relatively high quality


of free (or nearly free) software available over the web via the GNU license
and others.
SystemC implements project reuse by leveraging C++ interfaces to
separate communications from algorithms. This leveraging allows
independent refinement of a block’s functionality and communication (I/O)
through the use of interfaces and adapters as lightly described in the next
chapter and discussed in detail in Chapter 13, Custom Channels.
Over two dozen EDA companies currently support SystemC by
providing automation solutions. Again, the C++ community provides a
plethora of design productivity tools that are cheaply or freely available over
the Internet.
Facing design complexity effectively with these five techniques is why
SystemC is emerging as today’s design language standard and is adding
users each day.
The next chapter explores a new system design methodology, a
transaction level model-based methodology, enabled by SystemC.
This page intentionally left blank
Chapter 2

TLM-BASED METHODOLOGY

This chapter examines a methodology that enables you to model your


large system designs at higher level of abstraction and realize actual
productivity gains offered by SystemC.

2.1 Transaction-Level Modeling Overview

In the past, when many systems were a more manageable size, a system
could be grasped by a single person known by a variety of titles such as
system architect, chief engineer, lead engineer, or project engineer. This
guru may have been a software engineer, hardware engineer, or algorithm
expert depending on the primary technology leveraged for the system. The
complexity was such that this person could keep most or all of the details in
his or her head, and this technical leader was able to use spreadsheets and
paper-based methods to communicate thoughts and concepts to the rest of
the team.
The guru’s background usually dictated his or her success in
communicating requirements to each of the communities involved in the
design of the system. The guru’s past experiences also controlled the quality
of the multi-discipline trade offs such as hardware implementation versus
software implementation versus algorithm improvements.
In most cases, these trade offs resulted in conceptual disconnects among
the three groups. For example, cellular telephone systems consist of very
complex algorithms, software, and hardware, and teams working on them
have traditionally leveraged more rigorous but still ad-hoc methods.
These methods usually consist of a software-based model; sometimes
called a system architectural model (SAM), written in C, Java, or a similar
language. The model is a communication vehicle between algorithm,
hardware, and software groups. The model may be used for algorithmic
refinement or used as basis for deriving hardware and software subsystem
specifications. The exact parameters modeled are specific to the system type
12 SystemC: From The Ground Up

and application, but the model is typically un-timed (more on this topic in
the following section). Typically, each team then uses a different language to
refine the design for their portion of the system. The teams leave behind the
original multi-discipline system model and in many cases, any informal
communication among the groups.
With rapidly increasing design complexity and the rising cost of failure,
system designers in most product domains will need a similar top-down
approach but with an improved methodology. An emerging system design
methodology based on Transaction-Level Modeling (TLM) is evolving from
the large system design methodology discussed above. This emerging
methodology has significantly more external and project design reuse
enabled by a language like SystemC.
Transaction-level modeling is an emerging concept without precise
definitions. A working group of Open SystemC Initiative (OSCI) is currently
defining a set of terminology for TLM and will eventually develop TLM
standards. In reality, when engineers talk of TLM, they are probably talking
about one or more of four different modeling styles that are discussed in the
following section.
The underlying concept of TLM is to model only the level of detail that
is needed by the engineers developing the system components and sub-
system for a particular task in the development process. By modeling only
the necessary details, design teams can realize huge gains in modeling speed
thus enabling a new methodology. At this level, changes are relatively easy
because the development team has not yet painted itself into a corner with
low-level details such as a parallel bus implementation versus a serial bus
implementation.
Using TLMs makes tasks usually reserved for hardware implementations
practical to run on a model early in the system development process. TLM is
a concept independent of language. However, to implement and refine TLM
models, it is helpful to have a language like SystemC whose features support
independent refinement of functionality and communication that is crucial to
efficient TLM development.
Before exploring this new design methodology we will explore some of
the background and terminology around TLM.
TLM-Based Methodology 13

2.2 Abstraction Models

Several sets of terminology have been defined for the abstraction levels
traditionally used in system models. We are presenting a slight variation of a
model developed and presented by Dan Gajski and Lukai Cai at CODES
(HW/SW Co-Design Conference) 2003 that is illustrated in Figure 2-1.
The first concept necessary for understanding TLM is that system and
sub-system communication and functionality can be developed and refined
independently. In this terminology, the communication and functionality
components can be un-timed (UT), approximately-timed (AT), or cycle-
timed (CT).

A model that is cycle-timing accurate for communication and for


functionality is usually referred to as a register-transfer level (RTL) model.
We refer to models with un-timed communication and functionality as a
SAM. The RTL model is traditionally used for automatic synthesis to gates.
Many times the SAM is used for algorithmic refinement and can be refined
to approximately-timed communication and/or functionality.
The other four points plotted on the graph are usually collectively
referred to as TLMs, and rely on approximately-timed functionality or
communication. Approximately-timed models can rely on statistical timing,
14 SystemC: From The Ground Up

estimated timing, or sub-system timing requirements (or budgets) derived


from system requirements.
A model with cycle-timed communication and approximately-timed
functionality has been referred to as a Bus Functional Model(BFM) in older
methodologies and the label is retained here. The three remaining TLMs
have not yet developed commonly accepted names. For now, we will use the
names developed by Gajski and Cai.

All of these models are not necessary for most systems. In reality, most
systems only need to progress through two or three points on the graph in
Figure 2-1. With a language that supports refinement concepts, the
transformation can be quite efficient.
TLM-Based Methodology 15

2.3 Another Look at Abstraction Models

In this section, to build out your understanding of how TLM can be


useful, we present a less rigorous and more example-based discussion of
TLM. We will assume a generic system containing a microprocessor, a few
devices, and memory connected by a bus.
The timing diagram in Figure 2-2 illustrates one possible design outcome
of a bus implementation. When first defining and modeling the system
application, the exact bus-timing details do not affect the design decisions,
and all the important information contained within the illustration is
transferred between the bus devices as one event or transaction (component-
assembly model).
Further into the development cycle, the number of bus cycles may
become important (to define bus cycle-time requirements, etc.) and the
information for each clock cycle of the bus is transferred as one transaction
or event (bus-arbitration or cycle-accurate computation models).
When the bus specification is fully chosen and defined, the bus is
modeled with a transaction or event per signal transition (bus functional or
RTL model). Of course, as more details are added, more events occur and
the speed of the model execution decreases.
In this diagram, the component assembly model takes 1 “event,” the bus
arbitration model takes approximately 5 “events,” and the RTL model takes
roughly 75 “events” (the exact number depends on the number of
transitioning signals and the exact simulator algorithm). This simple
example illustrates the magnitude of computation required and why more
system design teams are employing a TLM-based methodology.
16 SystemC: From The Ground Up

2.4 TLM-Based Methodology

Now that we have discussed some of the TLM concepts, we can look
more closely at a TLM-based methodology as illustrated in Figure 2-3.
In this methodology, we still start with the traditional methods used to
capture the customer requirements, a paper Product Requirements Document
(PRD). Sometimes, the product requirements are obtained directly from a
customer, but more likely the requirements are captured through the research
of a marketing group.
From the PRD, a SAM is developed. The SAM development effort may
cause changes or refinement to the PRD. The SAM is usually written by an
architect or architecture group and captures the product specification or
system critical parameters. In an algorithmic intensive system, the SAM will
be used to refine the system algorithms.
The SAM is then refined into a TLM that may start as a component
assembly type of TLM and is further refined to a bus arbitration model. The
TLM is refined further as software design and development and hardware
verification environment development progresses.
TLM-Based Methodology 17
18 SystemC: From The Ground Up

If the proper design language and techniques are used consistently


throughout the flow, then the SAM can be reused and refined to develop the
TLM. The TLM has several goals:
1. Refinement of implementation features such as HW/SW partitioning; HW
partitioning among ASICs, FPGAs, and boards; bus architecture
exploration; co-processor definition or selection; and many more
2. Development platform for system software
3. “Golden Model” for the hardware functional verification
4. Hardware micro-architecture exploration and a basis for developing
detailed hardware specifications
In the near future, if EDA tools mature sufficiently, the TLM code may
be refined to a behavioral synthesis model and be automatically converted to
hardware from a higher-level abstraction than the current RTL synthesis
flows. Today, the hardware refinement is likely done through a traditional
paper specification and RTL development techniques, although the
functional verification can now be performed via the TLM as outlined later
in this chapter.
At first, development of the TLM appears to be an unnecessary task.
However, the TLM creates benefits including:

Earlier software development


Earlier and better hardware functional verification test bench
Creates a clear and unbroken path from customer requirements to
detailed hardware and software specifications
After reading this book, you and your team should have the knowledge to
implement TLMs quickly and effectively. The following section discusses in
detail the benefits your team will bring to your organization when applying
this methodology: early software development and early hardware functional
verification.
TLM-Based Methodology 19

2.4.1 Early Software Development

In complex systems where new software and new hardware are being
created, software developers must often wait for the hardware design to be
finalized before they can begin detailed coding. Software developers must
also wait for devices (ICs and printed circuit boards) to be manufactured to
test their code in a realistic environment. Even then, creating a realistic
environment on a lab workbench can be very complex. This dependency
creates a long critical path that may add so much financial risk to a project
that it is never started.
Figure 2-4 illustrates a traditional system development project schedule.
The arrows highlight differences a TLM-based methodology would make.
The time scale and the duration of each phase depend on the project size,
project complexity, and the makeup of the system components (hardware,
software, and algorithms).
20 SystemC: From The Ground Up

Creating a TLM from the SAM slightly lengthens the architectural design
phase of a project, but it offers several potential benefits:

Ability to start refining and testing software earlier, thereby reducing


the overall development cycle
Ability to provide earlier and more realistic hardware/software trade
off studies at a time when changes are easier, thus improving overall
system quality
Ability to deliver executable models to customers both for validating
the specification and driving changes, and acceleration of product
adoption
Ability to cancel (or redefine) an unrealistic project before spending
even larger sums of money
Any opportunity to begin the software development work earlier warrants
consideration. Indeed, the bottom line financial returns for just starting
software development earlier, may dictate the adoption of this new
methodology without the other benefits listed above.

2.4.2 Better Hardware Functional Verification

System design teams are always looking for ways to provide more and
better functional verification of the hardware. The number of cases required
to functionally verify a system is growing even faster than the actual system
complexity.
Verifying the hardware interaction with the actual software and firmware
before creating the hardware is becoming increasingly more important. With
the chip mask set costs exceeding several hundred thousand dollars, finding
out after making chips that a software workaround for the hardware is
impossible or too slow is not acceptable. As a result, many teams are
developing simulation and emulation techniques to verify the hardware
interaction with the software and firmware.
Additionally, with the increase in size and complexity of the hardware, it
is increasingly important to verify that unforeseen interactions within the
chip, between chips, or between chips and software do not create
unacceptable consequences. Debugging these interactions without
significant visibility into the state of the chip being verified is very tough.
Very large Verilog or VHDL simulations along with emulation strategies
have traditionally been used for system-level functional verification. With
increasing system complexity, Verilog and VHDL simulations have become
too slow for such verification. Hardware emulation techniques have been
TLM-Based Methodology 21

used when simulation has been too slow, but emulation techniques often
have limited state visibility for debugging, and they can be very expensive.
When a design team develops a TLM, it is straightforward to refine the
model to a verification environment through the use of adapters as outlined
in the following section.

2.4.3 Adapters and Functional Verification

This section is a very brief overview of how a TLM model can be used as
part of an overall system functional verification strategy. With modern
systems, the hardware design is not fully debugged until it is successfully
running the system software. This approach enables functional verification
of the hardware with the system software prior to hardware availability.
More details about implementation of this approach are given in Chapter 13,
Custom Channels, and other sources4.
To show one way that adapters can be applied to a TLM to create a
verification environment, we will assume a generic system that looks like
Figure 2-5. The generic system is composed of a microprocessor, memory, a
couple of devices, and a bus with an arbiter.

4
Grotker, T., Liao, S., Martin, G., Swan, S. 2002. System Design with SystemC. Norwell
Massachusetts: Kluwer Academic Publishers.
22 SystemC: From The Ground Up

For our discussions, we will concentrate on communication refinement


and assume that the functionality of the devices, the memory, and the
microprocessor will be approximately-timed or cycle-timed as appropriate
throughout the design cycle.
In this very simple example, we assume that RTL views of the
microprocessor and memory are not available or not important at this point
in the verification strategy. In this case, the RTL for the two devices could
be functionally verified by insertion of an adapter as illustrated in Figure
2-6.
This approach dictates that the adapter converts the timing-accurate
signals of the bus coming from the RTL to a transaction view of the bus. The
RTL sees the bus activity that would be created by the microprocessor,
memory, and arbiter. Bus activity is propagated only to the non-RTL portion
of the system after the adapter creates the transaction. This propagation
creates a very high performance model compared to a traditional full RTL
model.
This approach is just one way of applying adapters. The system-critical
parameters, the system size, the system complexity, and more will contribute
to a verification plan that will define a system-specific approach for
application of adapters.
TLM-Based Methodology 23

2.5 Summary

A new TLM-based methodology is emerging to attack the design


productivity of complex systems. The benefits of adopting this style of
methodology are derived from early software development, early functional
verification, and higher system quality. The productivity improvements
derived from TLM-based methodology are huge and are the major
motivation for adoption. Now, it is time to explore SystemC, a language that
enables this new methodology.
This page intentionally left blank
Chapter 3

OVERVIEW OF SYSTEMC

Chapters 1 and 2 gave a brief context for the application of SystemC.


This chapter discusses the SystemC language, but still presents an overview
of the language elements. Details are discussed in-depth in subsequent
chapters. Despite our best efforts not to use any part of the language before it
is fully explained, some chapters may occasionally violate this goal due to
the interrelated nature of SystemC. This chapter briefly discusses the major
components of SystemC and their general usage and interactions as a way of
giving context for the subsequent chapters. This chapter also provides this
information as a brief overview for those times when unexplained SystemC
components are required because of SystemC construct interactions.
The following diagram illustrates the major components of SystemC. To
give a context throughout the book, we have included a duplicate of this
diagram at the beginning of each new chapter. Bolded type indicates the
topics discussed within that chapter.

For the rest of this chapter, we will discuss all of the components within
the figure that are outlined in bold, but only after discussing the SystemC
development environment and a few of the hardware-oriented features
26 SystemC: From The Ground Up

provided by SystemC. Much greater detail will be presented in subsequent


chapters.
SystemC addresses the modeling of both software and hardware using
C++. Since C++ already addresses most software concerns, it should come
as no surprise that SystemC focuses primarily on non-software issues. The
primary area of application for SystemC is the design of electronic systems,
but SystemC has been applied to non-electronic systems5.

3.1 C++ Mechanics for SystemC

We would like to start with the obligatory Hello_SystemC program but


first let’s look at the mechanics of compiling and executing a SystemC
program or model.
As stated many times in this book, SystemC is a C++ class library,
therefore, to compile and run a Hello_SystemC program, one must have a
working C++ and SystemC environment.
The components of this environment include a:

SystemC-supported platform
SystemC-supported C++ compiler
SystemC library (downloaded and compiled)
Compiler command sequence, make file, or equivalent
The latest OSCI reference SystemC release (2.0.1 at this writing)6 is
available for free from www.systemc.org. The download contains scripts and
make files for installation of the SystemC library as well as source code,
examples, and documentation. The install scripts are compatible with the
supported operating systems, and the scripts are relatively straightforward to
execute by following the documentation.
The latest OS requirements can be obtained from the download in a
readme file currently called INSTALL. SystemC is supported on various
flavors of Sun Solaris, Linux, and HP/UX. At this time, the OS list is limited
by the use of some assembly code that is used for increased simulation
performance in the SystemC simulation kernel. The current release is also
supported for various C++ compilers including GNU C++, Sun C++, and HP

5
For example, read the book, Microelectrofluidic Systems: Modeling and Simulation by
Tianhao Zhang et al., CRC Press, ISBN: 0849312760.
6
SystemC version 2.1 should be available during the summer of 2004, and supports more
platforms and compilers including MacOS X. Be sure to read the release notes carefully.
Overview of SystemC 27

C++. The currently supported compilers and compiler versions can also be
obtained from the INSTALL readme file in the SystemC download.
For beginners, this list should be considered exhaustive, although some
hardy souls have ported various SystemC versions to other unsupported
operating systems and C++ compilers. In addition, you will need gmake
installed on your system to quickly compile and install the SystemC library
with the directions documented in the INSTALL file.
The flow for compiling a SystemC program or design is very traditional,
and is illustrated in Figure 3-2 for GNU C++. Most other compilers will be
similar. The C++ compiler reads each of the SystemC code file sets
separately and creates an object file (usual file extension of . o). Each file set
usually consists of two files typically with standard file extensions. We use
.h and .cpp as file extensions, since these are the most commonly used in
C++. The .h file is generally referred to as the header file and the .cpp file
is often called the implementation file.

After creating the object files, the compiler (actually the loader or linker)
will link your object files and the appropriate object files from the SystemC
library (and other libraries such as the standard template library or STL).
The resulting file is usually referred to as an executable, and it contains the
SystemC simulation kernel and your design functionality.
The compiler and linker need to know two special pieces of information.
First, the compiler needs to know where the SystemC header files are
located (to support #include <systemc.h>). Second, the linker needs to
know where the compiled SystemC libraries are located. This is typically
28 SystemC: From The Ground Up

accomplished by providing an environment variable named SYSTEMC, and


ensuring the Makefile. rules use the information.7 If using gcc, the
command probably looks something like this:

g++ –I$ (SYSTEMC) /include \


–L$ (SYSTEMC) /lib–$ (ARCH) –lsystemc \
$(SRC)

Figure 3-3. Partial gcc Options to Compile and Link SystemC

The downloadable examples available from our website include


Makefiles setup for Linux and gcc. Please refer to your C++ tool manuals
for more information.
For the hardcore engineer types, you now have everything you need to
compile and run a Hello_SystemC program; we have provided the
obligatory program in Figure 3-4. Keywords for both C++ and SystemC are
in bold. The rest of you now have an overview of how to compile and run
the code examples in this book as well as your own SystemC creations.
Everyone is now ready to dive into the language itself.

7
For some installations, dynamic libraries may also be referenced if using the SystemC
Verification library.
Overview of SystemC 29

#include <systemc.h>
#include <iostream>
SC_MODULE(Hello_SystemC) {//declare the module class
sc_in_clk iclk; //define the clock port
SC_CTOR(Hello_SystemC) {//create a constructor
SC_METHOD(main_method) ;// register the main
// process
sensitive << iclk.neg();//specify clk
// sensitivity
dont_initialize(); //skip initial call
}
void main_method(void) {
std::cout << sc_time_stamp()
<<" Hello world!"
<< std::endl;
}
};
int sc_main(int argc, char* argv[]) {
//declare a time constant
const sc_time t_PERIOD (8,SC_NS) ;
//create periodic clock
sc_clock clk ("clk", t_PERIOD);
//create an instance
HelloWorld iHelloWorld ("iHelloWorld");
//connect the clock port and clock
iHelloWorld.iclk(clk) ;
// invoke the simulator
sc_start(10,SC_NS ) ;
return 0;
}

Figure 3-4. Hello_SystemC Program Example


30 SystemC: From The Ground Up

3.2 SystemC: A C++ Class for Hardware

SystemC provides mechanisms crucial to modeling hardware while using


a language environment compatible with software development. SystemC
provides several hardware-oriented constructs that are not normally available
in a software language but are required to model hardware. All of the
constructs are implemented within the context of the C++ language. This
section looks at SystemC from the viewpoint of the hardware-oriented
features. The major hardware-oriented features implemented within
SystemC include:

Time model
Hardware data types
Module hierarchy to manage structure and connectivity
Communications management between concurrent units of
execution
Concurrency model
The following sections briefly discuss the implementation of these
concepts within SystemC.

3.2.1 Time Model

SystemC tracks time with 64 bits of resolution using a class known as


sc_time. Global time is advanced within the kernel. SystemC provides
mechanisms to obtain the current time and implement specific time delays.
To support ease of use, an enumerated type defines several natural time units
from seconds (SC_SEC) to femtoseconds (SC_FSEC).
For those models that require a clock, a class called sc_clock is
provided. This clock class is discussed in Chapter 14, Advanced Topics. The
clock discussion is deferred to later chapters of the book, since many
applications in SystemC do not require a clock (but do require a notion of
time). Additionally, clocks do not add to the fundamental understanding of
the language. By the later chapters, you should be able to implement the
clock class yourself with the fundamentals learned throughout the book.
However, you may find that you will still use the sc_clock class as a
convenience.
Overview of SystemC 31

3.2.2 Hardware Data Types

The wide variety of data types required by digital hardware are not
provided inside the natural boundaries of C++ native data types, which are
typically 8-, 16-, 32-, and 64-bit entities.
SystemC provides hardware-compatible data types that support explicit
bit widths for both integral (e.g., sc_int<>) and fixed-point (e.g.,
sc_fixed<>) quantities. These data types are implemented using templated
classes and generous operator overloading, so that they can be manipulated
and used almost as easily as native C++ data types.
Furthermore, digital hardware can represent non-binary quantities such as
tri-state and unknown state. These are supported with four-state logic
(0,1,X,Z) data types (e.g., sc_logic). SystemC provides all the necessary
methods for using hardware data types, including conversion between the
hardware data types and conversion from hardware to software data types.
Finally, hardware is not always digital. SystemC does not currently
directly support analog hardware; however, a working group has been
formed to investigate the issues associated with modeling analog hardware
in SystemC. For those with immediate analog issues, it is reasonable to
model analog values using floating-point representations and providing the
appropriate behavior.

3.2.3 Hierarchy and Structure

Large designs are almost always broken down hierarchically to manage


complexity, easing understanding of the design for the engineering team.
SystemC provides several constructs for implementing hardware hierarchy.
Hardware designs traditionally use blocks interconnected with wires or
signals for this purpose. For modeling hardware hierarchy, SystemC uses the
module entity interconnected to other modules using channels. The hierarchy
comes from the instantiation of module classes within other modules and is
discussed in Chapter 10, Structure.
Other documents randomly have
different content
Afterward they sat with Mr. Darrel before the fire in his smaller
building, and listened to what he had to tell them. The paper had
been duly signed in the presence of witnesses. One of the
lumberjacks, really the foreman of the crowd, being a duly appointed
notary public, was in a position to handle the affair according to law.
The paper was now safely fastened in Frank’s inner pocket, where it
could hardly be lost, no matter what happened.
After the lumberman had spoken of many things of which the boys
manifested an eager curiosity to hear, he in turn began to ask
questions. This resulted in their telling him some of the queer
happenings that had accompanied their numerous past outings; in
all of which he evinced great interest.
“I must say you are boys after my own heart,” he said, as the
evening grew late, and Bluff had even yawned openly as many as
three times. “If my little fellow had lived I would have wished him to
be built on just the same pattern. I meant that he should love the
Great Outdoors, and yet never be cruel in his pursuit of what we call
sport. But he was taken away from me. What I am piling up now will
some of these days go to a poor little crippled nephew in a New
England town.”
As Bluff again yawned at a fearful rate their kind host realized that
the boys were more or less played out after their long journey, and
the task of “toting” their heavy packs into the Big Woods.
So he told them it was about time they all turned in, an invitation
that was joyfully accepted by every one, not even excepting Frank.
It is doubtful whether they knew anything from the time they rested
their heads on the pillows, made of hemlock needles stuffed into
cotton-sacks, until there was a tremendous din that made them
think of the fire signal at home.
“That’s the getting-up gong!” they heard Mr. Darrel call. “Breakfast
will be ready in fifteen minutes, so perhaps you’d better hurry. My
men have big appetites these brisk days, and might clear off the
table before you had a show.”
Of course the lumberman was only joking, for Cuba had gone to
extra pains to have an abundance of food prepared. He had made
fresh biscuits, and there was also oatmeal and coffee, with some
fried ham and potatoes, as well as an egg apiece for the favored
young guests of the “boss.”
Pretty soon the big lumberjacks started off to their daily work of
chopping down trees. These would be trimmed into logs, and
eventually be drawn by teams of horses to the river, where their
voyage down to the sawmills or the pulp factories would begin.
The boys had never been in a lumbering region before, and
numerous things interested them. Each brawny axman shouted
good-by to the boys ere departing, for they were a jovial as well as a
brawny lot. Frank could see how a life like this must develop any one
physically.
Having received full directions from their host how to find his lonely
lodge in the heart of the Big Woods, the four chums set out. Mr.
Darrel would have accompanied them but for the fact that he had
his hands full just then, and was expecting a new lot of employees
to arrive that day.
“But a little later on you can expect a visit from me, lads,” he told
them, as he squeezed each boy’s hand in a way that made them
wince. “I’ll be looking forward to seeing you again with considerable
pleasure.”
So the chums started off. Being fresh after a good night’s sleep, they
did not mind the weight of their packs so much now. Later on in the
day, if the tramp proved protracted, they might murmur again,
particularly Bluff. He was addicted to that habit, though he really did
not mean anything by it, as Frank knew from experience.
They tramped for more than an hour. Frank was always on the
watch. He had been given explicit directions, which he was following
closely. For a mile they had kept along the little creek, now
beginning to freeze. Arriving at a spot where a spruce tree hung
half-way across the bed of the stream, they had turned sharply to
the left, and commenced making their way through a dense
wilderness of firs.
In this way the second mile had been covered, while a third had
taken them to what seemed to be quite a little hill.
“Sure we’re on the right track, are you, Frank?” asked Will, when
they had left this elevation behind them nearly half an hour.
“Yes, we’re going as straight as a die,” Bluff hastened to say, before
the leader could utter a word. “I know it because right ahead of us I
can see that other little stream Mr. Darrel was saying we’d strike.
Down that two miles and we’ll come to his cabin.”
“I only hope we find it unoccupied, that’s all,” ventured Will.
“No danger of anybody breaking in,” Frank declared. “Up here in the
Maine woods there’s a queer sort of law among the natives. They
are honest as the day in that way. Nobody ever thinks of locking his
door at night.”
“Small game seems to be plenty enough,” Bluff went on to say. “But
where are all the deer they’ve been telling us about? I’d like to run
across something worth taking a crack at with my pump-gun.”
“Then there’s your chance, Bluff!” suddenly remarked Will. “Why, it
looks for all the world like a gray wolf to me!”
“It must be a wolf, because Mr. Darrel said they sometimes come
down here from over the Canadian border!” exclaimed Jerry.
“I’ll wolf him with that buckshot charge I’ve got ready for a deer!”
muttered Bluff fiercely, as he dropped his pack and started to bring
his repeating shotgun up to his shoulder.
“Hold on!” cried Frank, pulling the weapon hastily down. “Look
again, Bluff, and you’ll see that’s no wolf, but a dingy dog. Yes, and
we’ve seen that dog before, too!”
CHAPTER VI—THE LONE CABIN

“Here’s trouble ahead!” declared Jerry, in evident disgust; “because


sure enough that’s certainly the ugly beast we saw on the train.”
“Bill Nackerson’s dog!” exclaimed Will.
Bluff was still staring. He seemed half-inclined to doubt his eyesight.
Just then the dingy-looking animal gave a series of snappy barks;
after which expression of defiance to the boys he turned and
scampered away at a rapid pace.
“For three cents I’d knock him over,” muttered Bluff angrily.
“It would be silly for you to try it, Bluff,” Frank told him, “and only
give the dog’s owner a good reason for taking the law in his own
hands.”
“But, just think of it, that crowd must have got off at the next
station, Frank!” declared Bluff.
“Well, they had a right to, if they felt like it, I suppose,” he was told.
“Since when did the railroad company give us charge over the trains
up here in Maine, that we could object to anybody leaving the cars?
We did that when we felt like it.”
“Yes, but we’re going to have that bunch around here, and they’ll be
our rivals in the hunting,” Bluff continued vigorously.
“If half they tell us is true,” laughed Frank, determined not to cross
rivers before he came to them, “there’ll be plenty of game here for
us all.”
“But when that Nackerson knows we’re here he’ll just as like as not
try to make things uncomfortable for us,” Jerry broke in, showing
that he felt the same way Bluff did.
“Oh! let’s hope not,” murmured Will, whose motto was peace.
“If they bother us too much we can let Mr. Darrel know about it,”
Frank went on calmly.
“That’s so,” Will burst out, “and I tell you if a bunch of those husky
lumberjacks got busy, they’d chase Nackerson and his cronies out of
the Big Woods in a hurry, believe me!”
At the same time, while Frank tried to make light of the impending
trouble, deep down in his heart he feared they were to find the
Nackerson set of sporting men unpleasant neighbors.
“The only bother it can make us that I can see,” Frank told the
others, “is that we’ll have to do all our roaming around in couples.
There must be no solitary jaunts. With two to handle they would
hesitate to attempt anything serious. Remember that always, will
you, boys?”
“It’s just as well,” remarked Will, “and whoever stays in camp with
me can help with my photograph work. I’m in earnest about
succeeding in my particular branch on this trip; and p’raps you’d like
to know the reason why.”
“We certainly would,” Frank told him; “I’ve had an idea that you
were keeping something back all this while; so out with it.”
Will chuckled, and took some papers from his pocket.
“That’s a folder issued by one of the big Maine railroads,” he
explained. “You see, I happened to read in a paper that they had
offered some pretty nice cash prizes for the best photographs taken
this season that would show what woods life up here stood for. The
offer holds good up to New Year’s Day.”
“And you mean to enter—to try for the money?” demanded Bluff.
“That’s what I expect to,” was the reply. “I’ve complied with all the
conditions they impose, and if I’m lucky enough to get some first-
class views while in the Big Woods, I mean to submit them in
competition. It may be keen, and I’ll stand little show, but nothing
venture nothing win.”
Bluff knew what splendid work Will had been doing in the line of
sport he had taken as his especial hobby.
“Now, excuse me for differing with you there,” he said, “but I’d like
to say right here that if you go in for those prizes they’re sure to
drop into your hand like ripe plums. You know how to get results
better’n any amateur photographer I ever ran across.”
They were once more pushing forward while discussing this latest
matter. For the time being every one seemed to have quite forgotten
the unpleasant feeling conjured up by the sudden appearance of the
dog.
It was near the middle of the day when, after following the stream
in its meanderings for quite two miles, Frank pointed out to them
the object of their search.
“There’s the little cabin, sure enough,” said Bluff, his voice full of
pleasure, “and let me tell you it looks all that Mr. Darrel cracked it up
to be.”
“For my part I think we ought to be as comfortable as four bugs in a
rug in such a cozy hut,” Will told them, happy in the thought that he
could now drop that heavy pack, and before long start to taking
some of the beautiful scenes of the snowy woods.
There was only an inch or so of the white covering on the ground,
but it gave the landscape a wintry appearance. They had really had
more of a fall in their far distant home town, Frank remembered,
thinking of the snowball battle, and the broken window.
A few minutes later they were inside the cabin. Every boy expressed
himself as delighted with the prospects. There was a huge fireplace,
and just four bunks ranged around the interior, with a rude table,
and a number of home-made rustic chairs.
It did not take them long to begin to make things seem homelike,
once they had their packs open. The cheery sound of the ax at work
told that a fire would soon add to the charm of that interior. Then
would follow the delightful odors of cooking, with each boy taking
his turn.
By the time the afternoon was well along they had managed to stow
everything in the place where it was intended to be found. Their
well-beloved blankets, that had accompanied them on numerous
outings, were settled each in the particular bunk its owner had
chosen.
“Now that I’ve hung our cooking things up on these nails alongside
the fireplace there’s a cheery look about the place I like,” Will
announced, with considerable pride in his voice.
“And that pile of firewood outside the door, cut by all of us in turn,
stands for solid comfort in my eyes,” Jerry remarked, as he ruefully
surveyed the first row of blisters on palms unused to such hard
work.
“With plenty of game to be had,” announced Bluff, patting his
favorite gun, “we ought to be as happy as the day is long—only for
that tough crowd being somewhere close by.”
“Frank,” remarked Will, “have you any idea how far away they are
camping?”
“Well, that would be a hard question to answer,” replied the other,
smiling, “only for the fact that our friend, Mr. Darrel, happened to
mention a little thing I expect might have a bearing on what you
want to know.”
“But he couldn’t know anything about that Nackerson crowd?”
objected Jerry.
“I don’t suppose he did,” Frank informed him, “but in telling me how
to get over to his little lodge he mentioned another log cabin that lay
in the woods on the way here. He said it was an old one that some
trappers had used long ago. The roof was bad, but might be
repaired. Sometimes hunters stopped there a night or two when
passing through.”
“Then that must be where those men are putting up,” said Will.
“Let’s hope two nights will be their limit, and that none of us run
across them when off in the big timber.”
“Forget about such an unpleasant subject,” advised Frank.
“Everything looks bright and promising around us, so what’s the use
bothering with trouble that may never happen?”
He changed the subject, and soon the others had apparently
forgotten all about the near presence of Bill Nackerson and his evil
companions.
Supper that evening was a meal not soon to be forgotten. The boys
all had a hand in its preparation. Soon they meant to adopt a system
that would give each one his regular turn at this important duty.
And then afterward, how jolly it was to make themselves
comfortable before a roaring fire, and talk of home, or the many
interesting things that had happened to them on past outings.
Later on all were snuggled down under their blankets in their bunks.
The fire burned low, and would perhaps go out entirely before dawn
came.
The last thing Bluff remembered hearing was the far-off hooting of
some owl that braved the winter’s cold. It seemed to soothe him, for,
listening, and occasionally hearing the cheery cackle of the fire, Bluff
lost himself in sleep.
CHAPTER VII—OUT FOR GAME

They had a peaceful night, with one exception. Along in the small
hours Bluff was heard to give a sudden wild whoop:
“Get out, you cowardly beast!” he cried at the top of his voice. Of
course there was considerable excitement.
Frank had been wise enough to bring a little vest-pocket type of
electric torch with him, knowing how valuable such a contrivance
may be at times. He instantly switched on the light; and, as he
picked up his gun with one hand, he managed to turn the white
glow upon the bunk occupied by Bluff.
The latter had apparently subsided, for no more shouts rang out.
Frank discovered him lying there rubbing his eyes. He looked as
though hardly knowing whether to burst out laughing or appear
ashamed of having startled the others so.
“What’s all this row mean, Bluff?” demanded Frank sternly.
“Shucks! I guess I must have been dreaming, that’s all,” he was told.
“What nipped you? Because you acted as if it hurt,” Jerry asked.
“Why, you see,” explained Bluff, “I had come across that big Bill
Nackerson, while roamin’ through the woods, and he managed to
sneak my gun away when I wasn’t looking. Then what did he do but
sic that mangy cur of his on me. I was kickin’ like everything at him.
See how I sent my blanket out on the floor. All I wanted was one
sound smack at his ugly jaws. I’m sorry I woke up so soon, because
next time I’d have fetched him.”
“Well, go to sleep again, and let’s hope you dream of other things
besides scrapping,” advised Jerry, as he proceeded to once more
deposit his gun in a corner, and crawl under his blanket.
Bluff must have taken the advice to heart; at any rate his voice was
not heard again until Frank pounded on the frying-pan to let the
sleepers know it was time to creep out. Then each one in turn
wanted to learn whether breakfast was ready.
As they ate they began to lay out plans for the day.
“Of course Bluff and Frank must try to get us some venison,” Will
said; “and that’ll leave Jerry to assist me in camp. Besides, I want to
find places to fix up my flashlight for the next night. If I can get a
picture of some animal, taken by himself, it’ll please me a heap.
What you know about the habits of these little creatures will help me
out lots, Jerry.”
“I may be able to give a little advice, too, Will,” the latter remarked,
as he helped himself to another flapjack; “because, you know, I
went out with that gentleman who was stopping at our house late
this fall. He had the flashlight habit about as bad as any one I’ve
ever met.”
“Oh! you did mention it to me once, I remember,” said the other,
evidently much pleased. “Then you may have picked up a few little
wrinkles that will help me out in my game.”
“Leave that to me,” replied Jerry, swelling with importance. “I can
put you wise to heaps of things. You see, I like to ask questions, and
Mr. Mallon always gave me the straight answer.”
Breakfast was now about over, and the proposed hunt came next in
order.
Frank never went off without making sure of a number of small but
very important things. First of all he carried a compass. Next he
made certain that he had an abundance of matches. After that
ammunition was taken care of, and last of all enough food for a
“snack.”
Frank was also a great hand for arranging a code of signals with his
chums. This was an easy thing to do, because they had gone
together so long now that they had a regular system that could be
used as a means of conferring with one another, even when a
considerable distance apart.
“Will’s mentioning that he wished we’d thought to fetch some syrup
or honey along to go with the flapjacks,” Frank was saying, just
before they broke away from camp, “makes me think that there are
plenty of wild bees up here in Maine. Men hunt for their tree hives
every season, and often find stacks of good honey, too.”
“Then, for goodness’ sake, fellows,” exclaimed Will, “please keep an
eye out for any sign of a hive. Nothing would please me better than
to have a pail of honey on hand. I’d just like to fill myself up with it,
for once.”
“It’s a poor time of year to find a bee tree,” said Frank. “They usually
look for a hive in summer, when the bees are flying and can be
traced. Often the storehouse is away up at the top of a high tree.
The weather is so cold now there wouldn’t be any young bees airing
themselves in the sun.”
“Well, you never know,” ventured Jerry; “and, as you saunter along,
just watch out for the signs. I understand bears often raid a hive.
You might find empty combs lying on the ground under some tree.”
“Make up your mind we’ll not forget to keep an eye out,” Frank
assured the camp guardians. “That reminds me, I promised to tell
you a lot of interesting things about this country up here. I’ll do it to-
night, if you mention it to me after supper.”
“I’ll remind you, sure thing,” returned Bluff eagerly, “because I
understand that a whole army of people make some sort of a living
out of the Maine woods, and I’ve always wanted to know how they
could do it. Take my gun away, and I’d like as not starve to death
here inside of a week.”
“All because you haven’t been brought up in Maine,” Frank told him,
“and are as good as blind to the wonderful opportunities all around
you. But, if you’re ready, Bluff, let’s be starting off.”
“Good luck to you!” cried Will, who was already engaged with his
camera.
Bluff was soon tagging along at the heels of Frank, though
occasionally he took a notion to push to the front. This was when he
fancied that a particular patch of undergrowth looked promising.
Being in a humor to gather in a few of the numerous plump
partridges that they knew were to be found in the timber, Bluff had
his pump-gun loaded with shells containing moderate loads of
powder and small shot. He thought that, with Frank at his side
carrying a repeating rifle, there was no need of both being on the
lookout for big game.
They walked on, apparently in an aimless fashion, but Frank knew
just where he was going. One of his objects had been to avoid
heading in the quarter where he had reason to believe that deserted
trapper’s cabin was located, near the edge of the muskrat marsh. If,
as they feared, it was now occupied by Bill Nackerson and his crew,
Frank wanted to keep as far away from the place as he could.
Suddenly there came a humming sound, that caused Bluff to throw
up his gun. With a quick discharge a flutter of feathers announced
that he had made a hit.
“That’s a good start, Bluff,” Frank told him; “you got your bird, all
right; but, hold on—don’t think of rushing over there. There were
two others, and perhaps you don’t know a queer way partridges
have of lighting on the lower limbs of trees after being flushed.”
“Say, that’s a fact, you did tell me that once, but I’d forgotten it,”
Bluff candidly admitted. “And they use a dog to scare the birds up.
That was what Nackerson had trained his cur to do, wasn’t it?”
“They bark and run about under the tree after the birds have taken
to the limbs,” Frank continued; “and so the hunter can walk up close
to pick his shot. It’s easy work, and when the partridges are thick up
here no one need go hungry.”
“Well, all I’ve ever shot went off like a hurricane; and often I’ve had
to let fly with my gun part way up to my shoulder. Do you see either
of the others, Frank?”
“Yes, and, as luck will have it, they’ve lighted in such a way that
they’re both in range. I believe you could drop two birds with one
shot, Bluff.”
“I see ’em now,” muttered Bluff. “Watch my smoke.”
When he fired again both birds fell. Bluff looked as though half-
ashamed of such easy work.
“Three already, eh? Nearly a chicken apiece, all around. Well, I might
limit myself to just one more, and then call my part of the business
off for to-day.”
He loaded himself down with the partridges, though Frank offered to
carry one or more for him.
“You’ll need both hands for quick work, if we should happen to start
a deer a little later on,” Bluff replied, giving Frank a cheery smile.
“Listen, there goes a gun!” said Frank, soon afterward.
“There’s another—yes, and a whole raft of them!” cried Bluff. “Of
course it’s that crowd of Nackerson’s. I’m glad they’re pretty far
away from here.”
“Yes, and we’ll make a detour, so as not to get any closer to them,”
Frank said, as he changed their course.
“I hope this new ground will give us better luck,” Bluff went on.
They continued to push on until half a mile had been traversed.
It happened that Bluff was a little in advance of his chum, when,
without the least warning, there was a sudden crash in the thicket.
Then he saw something dun-colored spring away.
“Oh! Frank! look, there he goes skipping out; and it’s a three-
pronged buck, at that!” he shouted.
Then, realizing that he might be interfering with the other’s aim,
being in line with the fleeing deer, Bluff dropped flat to the ground.
CHAPTER VIII—FUR AND FEATHERS

Crack!
That was Frank’s rifle, as Bluff well knew.
“Hurrah; he’s down, Frank; you got him that time! No, there he’s on
his feet again, as sure as anything. Oh, why didn’t I have buckshot
shells in my gun? There! That time you did drop him for keeps!
Bully! bully! bully!”
Bluff immediately got upon his feet, and, as well as his burden would
admit, started to run toward the spot were he had last seen the
buck go down.
Frank was following close at his heels, calling to him to go slow,
because it sometimes happened that a wounded buck proved
himself a dangerous antagonist.
It turned out, however, that there was nothing to fear. The deer was
dead when they arrived beside him.
“See, here’s where your first bullet struck him, Frank—just back of
the shoulder. He must have been swerving when you fired that shot
Would that have killed him, even if you didn’t fire again?”
“In time it would,” the other assured him, “though I’ve known deer
to run miles before dropping, after being hit in the body. That was a
poor shot for me.”
“But, when a buck is humping himself to get away, it strikes me a
fellow is doing pretty well to be able to hit him at all,” Bluff
remarked.
“I’m not proud of it, I can tell you. I had a fair chance, too,” Frank
continued. “The second shot was better, and finished him at once.
Well, here’s your venison, Bluff. What are you going to do with it
now?”
“He’s a whole lot bigger than any of the little deer we shot down in
Florida, that’s sure,” Bluff observed, “and, as we must be some miles
away from camp, excuse me from helping to lug him there. Suppose
we cut up the carcass, Frank? You’re a clever hand at that sort of
work. We could make up a pack of the best parts; and hang up
some more so it’d be out of the reach of foxes and skunks, and the
like.”
“Yes, and pick it up to-morrow, or another day, when perhaps luck
fails us,” ventured the leader, as though the idea appealed to him. “I
think that is the best plan, Bluff, so here goes.”
Accordingly he set aside his gun, after replacing the two spent
cartridges so as to always have the full set of six in magazine and
chamber. After that he got busy with his hunting knife.
Bluff hovered around, ready to assist when asked. Frank knew
considerable about such things, for he proved very deft with his
sharp blade.
The buck’s head was hung from a tree, high enough to keep any
animal from reaching it.
“Of course,” Frank explained, after they had managed to do this, “if
a hungry bobcat came along we couldn’t hope to prevent it from
getting there; and a Canada lynx would think nothing of making a
spring twice that high. But what we want most of all are the antlers;
and this will save them for us.”
He also made one package of meat to take home, and another that
they hung from a limb the same way the buck’s head had been.
“Now, are we ready to start for home?” asked Bluff, when all these
things had been looked after.
“Yes, because we’ve gone far enough for one thing,” replied Frank;
“and then, besides, we have all the game we need for the present.”
“Three birds is a poor number for our crowd,” the other protested.
“Either somebody has to go without, or else they must be divided
up.”
“Well, keep on the watch, and perhaps you may get a crack at
another on the way back to camp,” Frank advised him.
“Guess I will, and thank you for telling me, Frank. It was hardly fair,
though, for you to make all that venison up in just one pack. Why
didn’t you fix it so I could tote some on my back?”
“I figured that three fat partridges would be about as much as any
fellow cared to carry; and, if you should bag another, that’d make it
complete. So forget it, and be on the watch.”
That was Frank’s way, and Bluff knew it was no use trying to make
him change his plans. There was not a selfish bone in Frank
Langdon’s body—even his worst enemy would admit that much.
Before ten minutes had passed the chance came whereby Bluff was
enabled to fill out his assortment of partridges, so that every camper
could have one.
“That was a fine shot, Bluff!” Frank told him, when he had seen how
the spinning bird dropped like a stone the instant the gun was
discharged.
“That’s nice of you to say, Frank; sometimes I do manage to get
where I aim.”
They had to rest several times while on the way home. Finally the
cabin near the bank of the partly frozen creek was reached. Jerry
spied them coming, and at once set up a yell.
“Come out here, Will; hurry up!”
Immediately the other came flying into view. He carried his camera
in his hand, and there was a startled expression on his face.
“It isn’t fair to give a fellow a scare like that, Jerry,” he said
reproachfully. “I certainly thought a bear had you up a tree, and I
hoped to get the picture. It would have been the prize of my
collection, too. Now it turns out that it’s only Frank and Bluff coming
home from their hunt.”
“Well, that ought to make a good scene for a picture, oughtn’t it?”
Jerry demanded. “See what they’ve got with them, will you? A big
pack that contains venison, I know, because that’s a deer-skin it’s
wrapped in. And see Bluff fairly staggering under his load of game.
Boys, we’re proud of you.”
“Now we can begin to live like real hunters,” Will remarked, after he
had clicked his camera deftly, getting the proper light on the
returned chums. “With partridge and venison hung up we’ll be in
clover. All I’d like to see now would be a haunch of bear meat
alongside.”
Of course they must have plenty of the fruits of the hunt for supper
that night. The birds were immediately prepared and baked in an
oven that Frank showed them how to make, using a hole dug in the
ground.
“This way of baking game is an old hunter’s trick,” said Frank, while
he was excavating the oven, “and has been known among Indians
and others for nobody can tell how long. You see, it might be called
the origin of the up-to-date ‘fireless cookers.’ It is made very hot,
and then the food sealed in it so that the heat gradually does the
business.”
The others knew something about the method, although they had
possibly never been in a position to see the thing in operation. Frank
burned a special kind of hard wood in his oven until he had a bed of
glowing ashes. These he took out, and then the four partridges,
plucked and ready for eating, were wrapped in some clean muslin
Frank produced from his pack, and which had been previously
dampened.
After that the oven was sealed up the best way they could. As the
frost had not as yet penetrated more than an inch below the surface
of the ground, digging had not been found unduly difficult, using a
camp hatchet to hew the crust.
Hours later, when the oven was opened, it still retained an
astonishing amount of the heat that had been sealed up in it. The
birds they found cooked through and through.
“The very best way of preparing partridges that can be found, I
think,” was the comment of Will, who had read several cook-books at
home and had a jumble of their contents in his mind.
“It certainly has made these birds mighty tender and sweet,”
confessed Jerry, as he pulled his prize apart with hardly any effort.
“Things cooked in this way are always made tender,” Frank told
them. “A tough steak made ready for the table in a fireless cooker
will be as nice as the most costly porterhouse is when broiled or
fried. The only thing I object to is that it never seems to have that
nice brown look, and the taste that I like most of all. It’s more after
the style of a stew to me.”
As the four partridges were only skimpy “racks” when the boys
tossed them aside, it can be readily inferred that all the campers
enjoyed the feast abundantly. Indeed, they even had some of the
venison as a side dish; this was cooked in the frying-pan after the
usual manner.
“Might as well have enough game while about it,” Bluff remarked.
“And let me say right here and now that this sort of thing tastes a
heap finer when you’ve had the privilege of knocking over the game
yourself; or it’s been done by the party you’re with.”
When finally they had eaten until no one could contain another bite,
the boys, as was their habit, drew around the crackling fire, and
started discussing their affairs, as well as other matters that came
up.
Frank had warned Bluff that it might be just as well if they kept still
about the series of shots they had heard, accompanied by faint
shouts that might have stood for either triumph or excitement.
To his chagrin Jerry himself introduced the topic.
“While you were gone, fellows,” he went on to remark, “Will and I
were prowling around near here to find a good place to set his
flashlight trap camera to-night, when we heard a regular row some
distance over there. Must have been as many as five or six shots in
rapid succession, and some hollering, too.”
As the cat was now out of the bag, Frank felt there was no need of
keeping secret the fact that they, too, had heard the series of shots.
“Yes, we caught it just after we’d got our partridges, and before we
raised the buck,” he confessed; “I didn’t mean to say anything about
it, because there seemed no need; but since you’re wise to the fact
we can talk about it.”
“It must have been that Nackerson crowd, don’t you think?” asked
Will.
“There can be no question about that,” Frank replied.
“They started a deer, and were peppering away at him in great
shape, of course?” suggested Jerry.
“That sounds like the explanation,” he was told; “but then the same
shooting would have followed the discovery of a lynx, or perhaps a
black bear in a tree. All we can be sure about is that we want to
fight shy of that country over there. We can hunt a different field;
and I’m in hopes that by doing so we’ll miss running across those
men all the time we’re up here.”
“Now, Frank, you remember you told us to remind you of
something?” Jerry remarked when the conversation flagged.
“You mean about this wonderful woods country up in the State of
Maine,” Frank went on, smiling as though the task he had been
called on to shoulder pleased him, since he was a native of the
State, and loved it dearly.
“Yes; something about the strange ways you said there were for
men to make a living in the woods,” Bluff added.
CHAPTER IX—THE WONDERLAND OF MAINE

“I’ve already spoken about the professional honey hunter,” began


Frank, “who puts in a lot of his time summers roaming the woods in
certain sections, always on the lookout for bees working in the
blossoms or flowers.”
“Yes,” Will broke in, “and we know how they find the hives in dead
limbs of trees, by trailing working bees. They catch a bee that’s
loaded with honey, or sugar water supplied by the bee hunter, and
attach a little white stuff to him. This they can see for a long
distance as he makes a beeline for his home.”
“That’s right, because I watched a chap doing it once,” Bluff
asserted. “He kept edging closer and closer with every bee he
marked, till in the end he found the hive. I saw him take a heap of
good honey out of that tree, and I got beautifully stung in the
bargain.”
“Then there’s the man who gathers the crooked wood that ship
carpenters use for making boats’ knees,” Frank continued, marking
with his fingers as he spoke. “Nearly every small boat has to have
just so many. They’re mighty hard to get, even after you’ve run
across the right juniper or hackmatack, because it’s necessary that
they should be of a certain shape.”
“That’s sure a queer occupation,” remarked Jerry.
“Of course, there are lots of trappers up here who work all winter,”
Frank observed, “just as we know our old friend, Jesse Wilcox, does
out where we live. But the furs they get here are pretty valuable,
though not bringing quite as high a price as others taken up in
Canada and the Northwest.”
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookball.com

You might also like