  Conventional processor architectures are restricted in exploiting instruction
level parallelism (ILP) due to the relatively low number of programmer-visible
registers. Therefore, more recent processor architectures expose their
datapaths so that the compiler (1) can schedule parallel instructions to
different processing units and (2) can make effective use of local storage of
the processing units. Among these architectures, the Synchronous Control
Asynchronous Dataflow (SCAD) architecture is a new exposed datapath
architecture whose processing units are equipped with first-in first-out (FIFO)
buffers at their input and output ports.
  In contrast to register-based machines, the optimal code generation for SCAD
is still a matter of research. In particular, SAT and SMT solvers were used to
generate optimal resource constrained and optimal time constrained schedules
for SCAD, respectively. As Answer Set Programming (ASP) offers better
flexibility in handling such scheduling problems, we focus in this paper on
using an answer set solver for both resource and time constrained optimal SCAD
code generation. As a major benefit of using ASP, we are able to generate
\emph{all} optimal schedules for a given program which allows one to study
their properties. Furthermore, the experimental results of this paper
demonstrate that the answer set solver can compete with SAT solvers and
outperforms SMT solvers. \emph{This paper is under consideration for acceptance
in TPLP.}
