【LaTeX】 案例分析 (5) - 与 LaTeX 斗智斗勇

这篇博客详细介绍了如何利用C++编程计算矩阵转置所需的最小寄存器数量,并通过绘制生命周期图进行辅助分析。作者提供了完整的C++代码示例,展示了从矩阵定义、转置到计算延迟矩阵和绘制图表的过程。最后,通过分配表得出答案为9个寄存器。博客还包括了LaTeX编译和C++代码的链接,以及遇到的编译问题和解决策略。
摘要由CSDN通过智能技术生成

这是SEU新生研讨课作业,主要内容是学习数字信号处理。


代码

\documentclass{article}

\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{listings}
\usepackage{appendix}
\usepackage{bm, amsmath, amsfonts}
\usepackage{multirow}
\usepackage{hyperref}
\usepackage{subfig}
\usepackage{url}
\usepackage{cite}
%\usepackage{subfigure}
\usepackage[a4paper, left=2.5cm, right=2.5cm, top=2.65cm, bottom=2.54cm]{geometry}

\title{\Huge \bfseries Calculation of minimum number of registers with life time chart}
\author{\Large Teddy van Jerry}
\date{\today}

\pagestyle{fancy}
\fancyhf{}
\cfoot{\thepage}
\chead{ALL RIGHTS RESERVED \copyright \  2020 Teddy van Jerry }

% set the code style
\RequirePackage{listings}
\RequirePackage{xcolor}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{
	numbers=left,  
	frame=tb,
	aboveskip=3mm,
	belowskip=3mm,
	showstringspaces=false,
	columns=flexible,
	framerule=1pt,
	rulecolor=\color{gray!35},
	backgroundcolor=\color{gray!5},
	basicstyle={\ttfamily},
	numberstyle=\tiny\color{gray},
	keywordstyle=\color{blue},
	commentstyle=\color{dkgreen},
	stringstyle=\color{mauve},
	breaklines=true,
	breakatwhitespace=true,
	tabsize=3,
}

\begin{document}

    \maketitle

    \section{The exercise}

        \ \ \ \ To transpose a fourth-order matrix,
        what is the minimum number of registers?\cite{VLSI}

    \section{Life time chart}

        \ \ \ \ To calculate the minimum number of registers,
        I use C++ to work out the answer
        and draw the life time chart at the same time.\cite{Lifetime}

        Firstly we know the delay matrix
        \footnote{This is also calculated by C++.}
        is:

        $$
        \left[ \begin{matrix}
            9 & 12 & 15 & 18 \\
            6 &  9 & 12 & 15 \\
            3 &  6 &  9 & 12 \\
            0 &  3 &  6 &  9 \\
        \end{matrix} \right]
        $$

        Then we can draw (or calculate) the life time chart
        using C++.

        \begin{lstlisting}[language=C++,escapeinside=``]
#include <io
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值