File: x.vhd.styled

package info (click to toggle)
codequery 1.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,860 kB
  • sloc: cpp: 151,420; xml: 16,576; python: 5,602; ansic: 5,487; makefile: 559; perl: 496; ruby: 209; sql: 194; sh: 106; php: 53; vhdl: 51; erlang: 47; objc: 22; lisp: 18; cobol: 18; modula3: 17; asm: 14; fortran: 12; ml: 11; tcl: 6
file content (57 lines) | stat: -rw-r--r-- 2,712 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{6}library{0} {6}ieee{5};{0}
{6}use{0} {6}ieee{5}.{6}std_logic_1164{5}.{6}all{5};{0}
{6}use{0} {6}ieee{5}.{6}std_logic_arith{5}.{6}all{5};{0}

{6}entity{0} {6}x{0} {6}is{0}
    {6}port{5}({0}
        {6}rst{0}  {5}:{0} {6}in{0}  {6}std_logic{5};{0}
        {6}clk{0}  {5}:{0} {6}in{0}  {6}std_logic{5};{0}
        {6}d{0}    {5}:{0} {6}in{0}  {6}std_logic{5};{0}
        {6}q{0}    {5}:{0} {6}out{0} {6}std_logic_vector{5};{0}
        {6}a{5},{0} {6}b{0} {5}:{0} {6}in{0}  {6}std_logic{5};{0}
        {6}v{0}    {5}:{0} {6}out{0} {6}std_logic{0}
    {5});{0}
{6}end{0} {6}x{5};{0}

{6}architecture{0} {6}behavioral{0} {6}of{0} {6}x{0} {6}is{0}
    {6}signal{0} {6}q_i{0} {5}:{0} {6}std_logic_vector{5}({6}q{0}'{6}range{5});{0}
{6}begin{0}

    {6}v{0}	{5}<={0} {6}a{0} {6}when{0} {6}b{0} {5}={0} {4}'1'{0} {6}else{0} {4}'0'{5};{0}

    {6}gen{5}:{0} {6}for{0} {6}j{0} {6}in{0} {6}q{0}'{6}low{0} {6}to{0} {6}q{0}'{6}high{0} {6}generate{0}
        {6}gen_first{5}:{0} {6}if{0} {6}j{0} {5}={0} {6}q{0}'{6}low{0} {6}generate{0}
            {6}variable{0} {6}foo{0} {5}:{0} {6}boolean{0} {5}:={0} {6}false{5};{0}
        {6}begin{0}
            {6}stage1{5}:{0} {6}process{0} {5}({6}rst{5},{0} {6}clk{5}){0} {6}begin{0}
                {6}if{0} {6}rst{0} {5}={0} {4}'1'{0} {6}then{0}
                    {6}q_i{5}({6}j{5}){0} {5}<={0} {4}'0'{5};{0}
                {6}elsif{0} {6}rising_edge{5}({6}clk{5}){0} {6}then{0}
                    {6}q_i{5}({6}j{5}){0} {5}<={0} {6}d{5};{0}
                    {6}case{0} {6}a{0} {6}is{0}
                    {6}when{0} {3}1{0} {5}=>{0}
                    {6}when{0} {3}2{0} {5}=>{0}
                    {6}when{0} {6}others{0} {5}=>{0}
                    {6}end{0} {6}case{5};{0}
                {6}end{0} {6}if{5};{0}
            {6}end{0} {6}process{5};{0}
        {6}else{0} {6}generate{0}
            {6}stages{5}:{0} {6}process{0} {5}({6}rst{5},{0} {6}clk{5}){0}
            {6}begin{0}
                {6}if{0} {6}rst{0} {5}={0} {4}'1'{0} {6}then{0}
                    {6}q_i{5}({6}j{5}){0} {5}<={0} {4}'0'{5};{0}
                {6}elsif{0} {6}rising_edge{5}({6}clk{5}){0} {6}then{0}
                    {6}for{0} {6}u{0} {6}in{0} {3}0{0} {6}to{0} {3}7{0} {6}loop{0}
                        {6}q_i{5}({6}j{5}){0} {5}<={0} {6}q_i{5}({6}j{0} {5}-{0} {3}1{5});{0}
                    {6}end{0} {6}loop{5};{0}
                {6}end{0} {6}if{5};{0}
            {6}end{0} {6}process{5};{0}
        {6}end{0} {6}generate{5};{0}
    {6}end{0} {6}generate{5};{0}

    {6}L{5}:{0} {6}case{0} {6}expression{0} {6}generate{0}
    {6}when{0} {6}choice1{0} {5}=>{0}
    {6}when{0} {6}choice2{0} {5}=>{0}
    {6}end{0} {6}generate{0} {6}L{5};{0}

{6}end{0} {6}behavioral{5};{0}