LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cores > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: digitalhomesolutions at cox.net<digitalhomesolutions@c...>
    Date: Thu Apr 19 09:22:49 CEST 2007
    Subject: [oc] task/module in case statement
    Top
    Is it possible to call up a module or task from within a case statement?
    I'm using the following code and when I place the sub-module in the
    case statement I get an error?

    module controller_top(iclk, led);
    input iclk;
    output led;

    reg clock_count;

    always @(posedge iclk)
    begin
    case (clock_count)
    0: begin
    clock_count = clock_count + 1;
    wb_write u1(iclk,led);
    end
    endcase
    end

    task wb_write;
    input clk;
    output q;
    reg [19:0] COUNT;

    initial
    begin
    COUNT=0;
    end

    assign q=COUNT[19];

    always @(posedge clk)
    begin
    COUNT = COUNT + 1;
    end
    endtask
    endmodule

    Follow upAuthor
    [oc] task/module in case statementShreshtha

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.