+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Full Member level 3
    Points: 1,399, Level: 8
    FlyingDutch's Avatar
    Join Date
    Dec 2017
    Location
    Bydgoszcz - Poland
    Posts
    185
    Helped
    26 / 26
    Points
    1,399
    Level
    8

    Is such goal achiveable - AVR Soft-Core

    Hello,

    it comes into my mind such idea: extend AVR Soft-Core described in this post:

    https://www.edaboard.com/showthread....implementation

    by new instruction. I mean adding to the original design VGA framebuffer and extending "Instruction Set" (ISA) of this soft-CPU by one instruction "vgaprint". I would like to extend "instruction decoder" and "executive system" of AVR soft-core by such instruction. The VGA framebuffer will have 24 rows and 40 columns, so the fo9rmat of new instruction would be:

    vgaprint(row, column, ASCI_character)


    It would be an assembler instruction recognizable by AVR CPU - CPU would be able to perform such instruction and print asci_character on VGA screen.

    There are two questions related to such idea:

    1) Extending AVR soft-core by VGA screenbuffer (being able to print ASCII character) and extending this CPU instruction set by such vgaprint instruction. I think that after spending respectively long time for such task I should be able to do such alteration.

    2) Extending AVR compiler (for example AVR-GCC) by one assembler instruction "vgaprint", and this seems to me be much difficult.The C compiler (and linker) should know how to translate such instruction to binary code (in the form undersdtandable by soft-core AVR CPU).

    Could someone give me hints for described task 1) and 2) ? I also be grateful for pointing literature related to such tasks.

    Thanks in advance and regards

    •   AltAdvertisement

        
       

  2. #2
    Advanced Member level 4
    Points: 7,907, Level: 21
    Achievements:
    7 years registered

    Join Date
    Jul 2010
    Location
    Sweden
    Posts
    1,061
    Helped
    403 / 403
    Points
    7,907
    Level
    21

    Re: Is such goal achiveable - AVR Soft-Core

    It is possible, and maybe useful as a training/learning experience.
    Otherwise, I think it is a bad idea. A "simpler" solution is to create a separate "vga terminal/screenbuffer" block and connect it with a byte-wide write port (memory mapped?).
    This requires no change to the CPU core or the compiler.

    Make such a block compatible with an existing serial terminal such as VT100 or similar.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  3. #3
    Full Member level 3
    Points: 1,399, Level: 8
    FlyingDutch's Avatar
    Join Date
    Dec 2017
    Location
    Bydgoszcz - Poland
    Posts
    185
    Helped
    26 / 26
    Points
    1,399
    Level
    8

    Re: Is such goal ac.hiveable - AVR Soft-Core

    Quote Originally Posted by std_match View Post
    It is possible, and maybe useful as a training/learning experience.
    Hello, yes I treat this task as myself training.

    Thanks for the answer :)



    •   AltAdvertisement

        
       

  4. #4
    Advanced Member level 4
    Points: 7,907, Level: 21
    Achievements:
    7 years registered

    Join Date
    Jul 2010
    Location
    Sweden
    Posts
    1,061
    Helped
    403 / 403
    Points
    7,907
    Level
    21

    Re: Is such goal achiveable - AVR Soft-Core

    Don't change the compiler. Write an assembler function that can be called from C-code.



--[[ ]]--